Changeset 3f27b9a for src/ResolvExpr


Ignore:
Timestamp:
Aug 15, 2017, 3:03:34 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
fcc88a4
Parents:
c6c6f2ae
Message:

Fix scoping issues for CatchStmt?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    rc6c6f2ae r3f27b9a  
    394394
    395395        void Resolver::visit( CatchStmt *catchStmt ) {
    396                 Parent::visit( catchStmt );
     396                // inline Indexer::visit so that the exception variable is still in-scope for
     397                // findSingleExpression() below
     398                Parent::enterScope();
     399                Visitor::visit( catchStmt );
    397400               
    398401                if ( catchStmt->get_cond() ) {
     
    403406                        catchStmt->set_cond( findSingleExpression( wrapped, *this ) );
    404407                }
     408
     409                Parent::leaveScope();
    405410        }
    406411
Note: See TracChangeset for help on using the changeset viewer.