Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r14755e5 ra55ebcc  
    891891                } else if ( auto unionInst = aggrExpr->result.as< ast::UnionInstType >() ) {
    892892                        addAggMembers( unionInst, aggrExpr, *cand, Cost::unsafe, "" );
    893                 } else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) {
     893                }
     894                else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) {
    894895                        // The Attribute Arrays are not yet generated, need to proxy them
    895896                        // as attribute function call
     
    897898                        if ( enumInst->base && enumInst->base->base ) {
    898899                                auto valueName = new ast::NameExpr(location, "valueE");
    899                                 auto untypedValueCall = new ast::UntypedExpr(
     900                                auto untypedValueCall = new ast::UntypedExpr( 
    900901                                        location, valueName, { aggrExpr } );
    901902                                auto result = ResolvExpr::findVoidExpression( untypedValueCall, context );
     
    974975                                        }
    975976
    976                                         if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);
     977                                        if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);                                             
    977978                                        else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type));
    978979                                }
     
    12391240                                                restructureCast( cand->expr, toType, castExpr->isGenerated ),
    12401241                                                copy( cand->env ), std::move( open ), std::move( need ), cand->cost + thisCost);
    1241                                         // currently assertions are always resolved immediately so this should have no effect.
     1242                                        // currently assertions are always resolved immediately so this should have no effect. 
    12421243                                        // if this somehow changes in the future (e.g. delayed by indeterminate return type)
    12431244                                        // we may need to revisit the logic.
     
    14021403        void Finder::postvisit( const ast::VariableExpr * variableExpr ) {
    14031404                // not sufficient to just pass `variableExpr` here, type might have changed since
    1404                 addCandidate( variableExpr, tenv );
     1405                addCandidate( variableExpr, tenv );             
    14051406        }
    14061407
     
    17911792                                        CandidateRef newCand =
    17921793                                                std::make_shared<Candidate>(
    1793                                                         newExpr, copy( tenv ), ast::OpenVarSet{},
     1794                                                        newExpr, copy( tenv ), ast::OpenVarSet{}, 
    17941795                                                        ast::AssertionSet{}, Cost::zero, cost
    17951796                                                );
    1796 
     1797                                       
    17971798                                        if (newCand->expr->env) {
    17981799                                                newCand->env.add(*newCand->expr->env);
Note: See TracChangeset for help on using the changeset viewer.