Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    rb2ea0cd rc333ed2  
    2626#include "Candidate.hpp"
    2727#include "CastCost.hpp"           // for castCost
    28 #include "CompilationState.hpp"
     28#include "CompilationState.h"
    2929#include "ConversionCost.h"       // for conversionCast
    3030#include "Cost.h"
     
    21382138}
    21392139
    2140 // get the valueE(...) ApplicationExpr that returns the enum value
    2141 const ast::Expr * getValueEnumCall(
    2142         const ast::Expr * expr,
    2143         const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env ) {
    2144                 auto callExpr = new ast::UntypedExpr(
    2145                         expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} );
    2146                 CandidateFinder finder( context, env );
    2147                 finder.find( callExpr );
    2148                 CandidateList winners = findMinCost( finder.candidates );
    2149                 if (winners.size() != 1) {
    2150                         SemanticError( callExpr, "Ambiguous expression in valueE..." );
    2151                 }
    2152                 CandidateRef & choice = winners.front();
    2153                 return choice->expr;
    2154 }
    2155 
    21562140const ast::Expr * createCondExpr( const ast::Expr * expr ) {
    21572141        assert( expr );
Note: See TracChangeset for help on using the changeset viewer.