diff options
| author | jon lipstate <52809771+jon-lipstate@users.noreply.github.com> | 2023-05-30 08:23:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-30 08:23:28 -0700 |
| commit | b223bc0302b54bb0629bd94d0b16e0f0720b6682 (patch) | |
| tree | eaa5de636a3fd8f5b008270fbaff268f40769f8c /src/llvm_backend_proc.cpp | |
| parent | f5dcbf517b88d7479fa12d5f3b59183a447cae6f (diff) | |
| parent | 3562a38f8cdd43792b6cdfd3327d16b65d25e5d0 (diff) | |
Merge branch 'odin-lang:master' into attr_error
Diffstat (limited to 'src/llvm_backend_proc.cpp')
| -rw-r--r-- | src/llvm_backend_proc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/llvm_backend_proc.cpp b/src/llvm_backend_proc.cpp index ddf058668..b8353a466 100644 --- a/src/llvm_backend_proc.cpp +++ b/src/llvm_backend_proc.cpp @@ -3218,10 +3218,10 @@ gb_internal lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) { Entity *e = params->variables[i]; if (args[i].type == nullptr) { continue; + } else if (is_type_untyped_uninit(args[i].type)) { + args[i] = lb_const_undef(m, e->type); } else if (is_type_untyped_nil(args[i].type)) { args[i] = lb_const_nil(m, e->type); - } else if (is_type_untyped_undef(args[i].type)) { - args[i] = lb_const_undef(m, e->type); } } @@ -3409,10 +3409,10 @@ gb_internal lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) { Entity *e = param_tuple->variables[i]; if (args[i].type == nullptr) { continue; + } else if (is_type_untyped_uninit(args[i].type)) { + args[i] = lb_const_undef(m, e->type); } else if (is_type_untyped_nil(args[i].type)) { args[i] = lb_const_nil(m, e->type); - } else if (is_type_untyped_undef(args[i].type)) { - args[i] = lb_const_undef(m, e->type); } } } |