fix labmda defs (#670)

This commit is contained in:
water111
2021-07-02 12:27:46 -04:00
committed by GitHub
parent fc124dd940
commit b96d865e2b
6 changed files with 45 additions and 44 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ bool convert_to_expressions(
// set argument names to some reasonable defaults. these will be used if the user doesn't
// give us anything more specific.
if (f.guessed_name.kind == FunctionName::FunctionKind::GLOBAL) {
if (f.guessed_name.kind == FunctionName::FunctionKind::GLOBAL ||
f.guessed_name.kind == FunctionName::FunctionKind::UNIDENTIFIED) {
f.ir2.env.set_remap_for_function(f.type.arg_count() - 1);
} else if (f.guessed_name.kind == FunctionName::FunctionKind::METHOD) {
if (f.guessed_name.method_id == GOAL_NEW_METHOD) {