Changeset c333ed2 for src/ResolvExpr/CandidateFinder.cpp
- Timestamp:
- May 7, 2024, 7:04:17 PM (5 months ago)
- Branches:
- master
- Children:
- 0b6c1c9
- Parents:
- 164a6b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r164a6b6 rc333ed2 2138 2138 } 2139 2139 2140 // get the valueE(...) ApplicationExpr that returns the enum value2141 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 2156 2140 const ast::Expr * createCondExpr( const ast::Expr * expr ) { 2157 2141 assert( expr );
Note: See TracChangeset
for help on using the changeset viewer.