Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.impl.hpp

    r954c954 r73f1b1c  
    154154                __pedantic_pass_assert( expr );
    155155
    156                 const ast::TypeSubstitution ** typeSubs_ptr = __pass::typeSubs( core, 0 );
    157                 if ( typeSubs_ptr && expr->env ) {
    158                         *typeSubs_ptr = expr->env;
     156                const ast::TypeSubstitution ** env_ptr = __pass::env( core, 0);
     157                if ( env_ptr && expr->env ) {
     158                        *env_ptr = expr->env;
    159159                }
    160160
     
    177177
    178178                // These may be modified by subnode but most be restored once we exit this statemnet.
    179                 ValueGuardPtr< const ast::TypeSubstitution * > __old_env         ( __pass::typeSubs( core, 0 ) );
     179                ValueGuardPtr< const ast::TypeSubstitution * > __old_env         ( __pass::env( core, 0) );
    180180                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_before) >::type > __old_decls_before( stmts_before );
    181181                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_after ) >::type > __old_decls_after ( stmts_after  );
     
    465465                        __pass::symtab::addId( core, 0, func );
    466466                        VISIT(
    467                                 // parameter declarations are now directly here
    468                                 maybe_accept( node, &FunctionDecl::params );
    469                                 maybe_accept( node, &FunctionDecl::returns );
    470                                 // foralls are still in function type
    471467                                maybe_accept( node, &FunctionDecl::type );
    472468                                // function body needs to have the same scope as parameters - CompoundStmt will not enter
     
    14921488
    14931489                // These may be modified by subnode but most be restored once we exit this statemnet.
    1494                 ValueGuardPtr< const ast::TypeSubstitution * > __old_env( __pass::typeSubs( core, 0 ) );
     1490                ValueGuardPtr< const ast::TypeSubstitution * > __old_env( __pass::env( core, 0) );
    14951491                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_before) >::type > __old_decls_before( stmts_before );
    14961492                ValueGuardPtr< typename std::remove_pointer< decltype(stmts_after ) >::type > __old_decls_after ( stmts_after  );
Note: See TracChangeset for help on using the changeset viewer.