diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-22 22:15:09 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-22 22:15:09 -0500 |
| commit | 9e2645ade797be29ce949070c9046e6997416c34 (patch) | |
| tree | 7a634fbe56a56b27fe42e89213895358fe1e6b28 /typecheck.c | |
| parent | 54b8b7af12301153a5e8e6f71287a72195aab438 (diff) | |
Fix up keyword args and default args
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c index 06f03552..fcb27bc1 100644 --- a/typecheck.c +++ b/typecheck.c @@ -161,7 +161,7 @@ type_t *get_function_def_type(env_t *env, ast_t *ast) env_t *scope = fresh_scope(env); for (arg_ast_t *arg = fn->args; arg; arg = arg->next) { type_t *t = arg->type ? parse_type_ast(env, arg->type) : get_type(env, arg->default_val); - args = new(arg_t, .name=arg->name, .type=t, .next=args); + args = new(arg_t, .name=arg->name, .type=t, .default_val=arg->default_val, .next=args); set_binding(scope, arg->name, new(binding_t, .type=t)); } REVERSE_LIST(args); |
