Ignore:
Timestamp:
Jun 1, 2023, 6:29:47 PM (13 months ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ast-experimental, master
Children:
24d6572, ded6c2a6
Parents:
1803d4d
Message:

remove reference to symbol table in unify

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r1803d4d r251ce80  
    11081108                void removeExtraneousCast( ast::ptr<ast::Expr> & expr, const ast::SymbolTable & symtab ) {
    11091109                        if ( const ast::CastExpr * castExpr = expr.as< ast::CastExpr >() ) {
    1110                                 if ( typesCompatible( castExpr->arg->result, castExpr->result, symtab ) ) {
     1110                                if ( typesCompatible( castExpr->arg->result, castExpr->result ) ) {
    11111111                                        // cast is to the same type as its argument, remove it
    11121112                                        swap_and_save_env( expr, castExpr->arg );
     
    18341834                                                                if (
    18351835                                                                        ! unify(
    1836                                                                                 arg->expr->result, *param, resultEnv, need, have, open,
    1837                                                                                 symtab )
     1836                                                                                arg->expr->result, *param, resultEnv, need, have, open )
    18381837                                                                ) {
    18391838                                                                        // Type doesn't match
Note: See TracChangeset for help on using the changeset viewer.