Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleAssignment.cc

    r3251b66 r07de76b  
    465465                                        // resolve ctor/dtor for the new object
    466466                                        ast::ptr< ast::Init > ctorInit = ResolvExpr::resolveCtorInit(
    467                                                         InitTweak::genCtorInit( location, ret ), spotter.crntFinder.localSyms );
     467                                                        InitTweak::genCtorInit( location, ret ), spotter.crntFinder.symtab );
    468468                                        // remove environments from subexpressions of stmtExpr
    469469                                        ast::Pass< EnvRemover > rm{ env };
     
    504504
    505505                        std::vector< ast::ptr< ast::Expr > > match() override {
    506                                 // temporary workaround for new and old ast to coexist and avoid name collision
    507                                 static UniqueName lhsNamer( "__massassign_Ln" );
    508                                 static UniqueName rhsNamer( "__massassign_Rn" );
     506                                static UniqueName lhsNamer( "__massassign_L" );
     507                                static UniqueName rhsNamer( "__massassign_R" );
    509508                                // empty tuple case falls into this matcher
    510509                                assert( lhs.empty() ? rhs.empty() : rhs.size() <= 1 );
     
    535534
    536535                        std::vector< ast::ptr< ast::Expr > > match() override {
    537                                 // temporary workaround for new and old ast to coexist and avoid name collision
    538                                 static UniqueName lhsNamer( "__multassign_Ln" );
    539                                 static UniqueName rhsNamer( "__multassign_Rn" );
     536                                static UniqueName lhsNamer( "__multassign_L" );
     537                                static UniqueName rhsNamer( "__multassign_R" );
    540538
    541539                                if ( lhs.size() != rhs.size() ) return {};
     
    562560                                        // resolve the cast expression so that rhsCand return type is bound by the cast
    563561                                        // type as needed, and transfer the resulting environment
    564                                         ResolvExpr::CandidateFinder finder{ spotter.crntFinder.localSyms, env };
     562                                        ResolvExpr::CandidateFinder finder{ spotter.crntFinder.symtab, env };
    565563                                        finder.find( rhsCand->expr, ResolvExpr::ResolvMode::withAdjustment() );
    566564                                        assert( finder.candidates.size() == 1 );
     
    611609                                        // explode the LHS so that each field of a tuple-valued expr is assigned
    612610                                        ResolvExpr::CandidateList lhs;
    613                                         explode( *lhsCand, crntFinder.localSyms, back_inserter(lhs), true );
     611                                        explode( *lhsCand, crntFinder.symtab, back_inserter(lhs), true );
    614612                                        for ( ResolvExpr::CandidateRef & cand : lhs ) {
    615613                                                // each LHS value must be a reference - some come in with a cast, if not
     
    631629                                                        if ( isTuple( rhsCand->expr ) ) {
    632630                                                                // multiple assignment
    633                                                                 explode( *rhsCand, crntFinder.localSyms, back_inserter(rhs), true );
     631                                                                explode( *rhsCand, crntFinder.symtab, back_inserter(rhs), true );
    634632                                                                matcher.reset(
    635633                                                                        new MultipleAssignMatcher{ *this, expr->location, lhs, rhs } );
     
    650648                                                        // multiple assignment
    651649                                                        ResolvExpr::CandidateList rhs;
    652                                                         explode( rhsCand, crntFinder.localSyms, back_inserter(rhs), true );
     650                                                        explode( rhsCand, crntFinder.symtab, back_inserter(rhs), true );
    653651                                                        matcher.reset(
    654652                                                                new MultipleAssignMatcher{ *this, expr->location, lhs, rhs } );
     
    680678                                )
    681679
    682                                 ResolvExpr::CandidateFinder finder{ crntFinder.localSyms, matcher->env };
     680                                ResolvExpr::CandidateFinder finder{ crntFinder.symtab, matcher->env };
    683681
    684682                                try {
Note: See TracChangeset for help on using the changeset viewer.