- Timestamp:
- Jun 24, 2024, 11:06:35 PM (5 months ago)
- Branches:
- master
- Children:
- 089b39e1, 6803ff1
- Parents:
- 253d0b4
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r253d0b4 r5eb3f65 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed Jun 5 14:30:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Mar 16 11:58:00 202213 // Update Count : 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 22 08:07:26 2024 13 // Update Count : 4 14 14 // 15 15 … … 909 909 auto location = expr->location; 910 910 auto callExpr = new ast::UntypedExpr( 911 location, new ast::NameExpr( location, "value E" ), {expr}911 location, new ast::NameExpr( location, "value" ), {expr} 912 912 ); 913 913 finder.find( callExpr ); 914 914 CandidateList winners = findMinCost( finder.candidates ); 915 915 if (winners.size() != 1) { 916 SemanticError( callExpr, "Ambiguous expression in value E..." );916 SemanticError( callExpr, "Ambiguous expression in value..." ); 917 917 } 918 918 CandidateRef & choice = winners.front(); -
src/Validate/ImplementEnumFunc.cpp
r253d0b4 r5eb3f65 175 175 ast::FunctionDecl* EnumAttrFuncGenerator::genPosnProto() const { 176 176 return genProto( 177 "pos E",177 "posn", 178 178 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 179 179 {new ast::ObjectDecl(getLocation(), "_ret", … … 183 183 ast::FunctionDecl* EnumAttrFuncGenerator::genLabelProto() const { 184 184 return genProto( 185 "label E",185 "label", 186 186 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 187 187 {new ast::ObjectDecl( … … 193 193 if (decl->base) 194 194 return genProto( 195 "value E",195 "value", 196 196 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 197 197 {new ast::ObjectDecl(getLocation(), "_ret", … … 203 203 ast::FunctionDecl* EnumAttrFuncGenerator::genQuasiValueProto() const { 204 204 return genProto( 205 "value E",205 "value", 206 206 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 207 207 {new ast::ObjectDecl(getLocation(), "_ret", … … 254 254 auto param = params.front(); 255 255 ast::UntypedExpr* untyped = ast::UntypedExpr::createCall( 256 func->location, "pos E", { new ast::VariableExpr(func->location, param) });256 func->location, "posn", { new ast::VariableExpr(func->location, param) }); 257 257 func->stmts = new ast::CompoundStmt( 258 258 func->location, {new ast::ReturnStmt(func->location, untyped)}
Note: See TracChangeset
for help on using the changeset viewer.