aboutsummaryrefslogtreecommitdiff
path: root/src/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-03 15:47:05 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-03 15:47:05 -0400
commitfadcb45baf1274e06cfe37b87655b9146aa52874 (patch)
tree97d0368f99870e6ec5029f38c513f89af2737fe6 /src/compile.c
parent2acc9c1f968a9d8ac24df47c4cb7ecc44c7d3826 (diff)
Allow specifying args like `func foo(xs:[Int] = [])`
Diffstat (limited to 'src/compile.c')
-rw-r--r--src/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compile.c b/src/compile.c
index 6b465b20..95cf5c9a 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -2004,7 +2004,7 @@ CORD compile_arguments(env_t *env, ast_t *call_ast, arg_t *spec_args, arg_ast_t
if (spec_arg->default_val) {
if (code) code = CORD_cat(code, ", ");
- code = CORD_cat(code, compile_maybe_incref(default_scope, spec_arg->default_val, get_type(env, spec_arg->default_val)));
+ code = CORD_cat(code, compile_maybe_incref(default_scope, spec_arg->default_val, get_arg_type(env, spec_arg)));
goto found_it;
}