diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-01-29 12:08:24 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-29 12:08:24 +0000 |
| commit | b8438075d43113703ca19b65a946b0830617e74f (patch) | |
| tree | 6da8ec1afd28338057a81c605f1bcf8fcd3db908 | |
| parent | 319e991cbba3857f4af35a029a0b7cb58528023a (diff) | |
| parent | 67541434f41de1eaeaa99cda0a0e3d0992869081 (diff) | |
Merge pull request #6191 from odin-lang/bill/fix-constant-check
Remove else check for untyped to typed
| -rw-r--r-- | src/check_expr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 36b4f6ec6..1c09ad908 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4704,12 +4704,14 @@ gb_internal void convert_to_typed(CheckerContext *c, Operand *operand, Type *tar switch (t->kind) { case Type_Basic: if (operand->mode == Addressing_Constant) { - check_is_expressible(c, operand, t); + check_is_expressible(c, operand, target_type); if (operand->mode == Addressing_Invalid) { return; } update_untyped_expr_value(c, operand->expr, operand->value); - } else { + } + + { switch (operand->type->Basic.kind) { case Basic_UntypedBool: if (!is_type_boolean(target_type)) { |