summaryrefslogtreecommitdiff
path: root/05/parse.b
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-02-12 23:44:48 -0500
committerpommicket <pommicket@gmail.com>2022-02-12 23:44:48 -0500
commit8c82a837786c59966410d53aaa128917f7d94c36 (patch)
tree5d32c7b27cd041928663618ac8eb254f3120c309 /05/parse.b
parent29a92afcf2f57f61849faa560ccff388ce2e49af (diff)
fix casting arguments to parameter type
Diffstat (limited to '05/parse.b')
-rw-r--r--05/parse.b4
1 files changed, 4 insertions, 0 deletions
diff --git a/05/parse.b b/05/parse.b
index 96941b9..fbdf955 100644
--- a/05/parse.b
+++ b/05/parse.b
@@ -2803,8 +2803,12 @@ function parse_expression
:call_args_loop
if *1p == SYMBOL_RPAREN goto call_args_loop_end
n = token_next_semicolon_comma_rbracket(p)
+ *1out = EXPRESSION_CAST ; generate cast to proper argument type
arg_type = out + 4
+ out += 8
+ b = out + 4
out = parse_expression(p, n, out)
+ *4arg_type = type_create_copy(*4b)
b = types + param_type
if *1b == 0 goto arg_is_varargs ; reached the end of arguments (so presumably this function has varargs)
; set argument type to parameter type. this is necessary because: