diff options
| author | gingerBill <bill@gingerbill.org> | 2023-05-22 12:53:29 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-05-22 12:53:29 +0100 |
| commit | 8bf32ac697ea21ff3b37e5b31fe0fc10e700c9a4 (patch) | |
| tree | 77e96ea43b5faf78d81ca1d8158db59fe3e24add /src/llvm_backend_proc.cpp | |
| parent | 540f724b1f57d0d5a40b65a59f6ee82e070c6ee5 (diff) | |
Minor change to handling of propagation of errors with `---` as a value
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); } } } |