Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    ra55ebcc r14755e5  
    891891                } else if ( auto unionInst = aggrExpr->result.as< ast::UnionInstType >() ) {
    892892                        addAggMembers( unionInst, aggrExpr, *cand, Cost::unsafe, "" );
    893                 }
    894                 else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) {
     893                } else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) {
    895894                        // The Attribute Arrays are not yet generated, need to proxy them
    896895                        // as attribute function call
     
    898897                        if ( enumInst->base && enumInst->base->base ) {
    899898                                auto valueName = new ast::NameExpr(location, "valueE");
    900                                 auto untypedValueCall = new ast::UntypedExpr( 
     899                                auto untypedValueCall = new ast::UntypedExpr(
    901900                                        location, valueName, { aggrExpr } );
    902901                                auto result = ResolvExpr::findVoidExpression( untypedValueCall, context );
     
    975974                                        }
    976975
    977                                         if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);                                             
     976                                        if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer);
    978977                                        else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type));
    979978                                }
     
    12401239                                                restructureCast( cand->expr, toType, castExpr->isGenerated ),
    12411240                                                copy( cand->env ), std::move( open ), std::move( need ), cand->cost + thisCost);
    1242                                         // currently assertions are always resolved immediately so this should have no effect. 
     1241                                        // currently assertions are always resolved immediately so this should have no effect.
    12431242                                        // if this somehow changes in the future (e.g. delayed by indeterminate return type)
    12441243                                        // we may need to revisit the logic.
     
    14031402        void Finder::postvisit( const ast::VariableExpr * variableExpr ) {
    14041403                // not sufficient to just pass `variableExpr` here, type might have changed since
    1405                 addCandidate( variableExpr, tenv );             
     1404                addCandidate( variableExpr, tenv );
    14061405        }
    14071406
     
    17921791                                        CandidateRef newCand =
    17931792                                                std::make_shared<Candidate>(
    1794                                                         newExpr, copy( tenv ), ast::OpenVarSet{}, 
     1793                                                        newExpr, copy( tenv ), ast::OpenVarSet{},
    17951794                                                        ast::AssertionSet{}, Cost::zero, cost
    17961795                                                );
    1797                                        
     1796
    17981797                                        if (newCand->expr->env) {
    17991798                                                newCand->env.add(*newCand->expr->env);
Note: See TracChangeset for help on using the changeset viewer.