Skip to content

Commit 33925fe

Browse files
committed
Fix an issue in strong typing for call parameters
1 parent c5e7626 commit 33925fe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler/compiler.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ i64_array* compile(ASTRoot* ast_root)
4444
// Declare functions in all parsed files
4545
declare_functions(ast_root, program);
4646

47-
// printFunctionTable();
48-
4947
// Compile functions in all parsed files
5048
compile_functions(ast_root, program);
5149

@@ -3575,7 +3573,7 @@ void strongly_type(Symbol* symbol_x, Symbol* symbol_y, _Function* function, Expr
35753573
}
35763574
}
35773575

3578-
if (function != NULL && value_type != V_ANY) {
3576+
if (function != NULL && value_type != V_ANY && value_type != V_REF) {
35793577
strongly_type_basic_check(E_ILLEGAL_VARIABLE_TYPE_FOR_FUNCTION_PARAMETER, symbol_x->name, function->name, symbol_x->type, value_type);
35803578
}
35813579
}

0 commit comments

Comments
 (0)