diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-02-07 07:30:14 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-07 07:30:14 +0000 |
| commit | 667ddc19076b118f844eff831c9cbe840918208b (patch) | |
| tree | 78624c66b27867be773a391ca900a89332b3e5a6 | |
| parent | 4e300b3fc804baa76ec7221a9e3e7083be84edf3 (diff) | |
| parent | 1281303ff756ce4a83dcdb20be6154c7a72f278f (diff) | |
Merge pull request #4786 from korvahkh/fix-variants2ptrs
Preserve `#no_nil` in `intrinsics.type_convert_variants_to_pointers`
| -rw-r--r-- | src/check_builtin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp index ea902387b..7d0ce3aef 100644 --- a/src/check_builtin.cpp +++ b/src/check_builtin.cpp @@ -5544,6 +5544,9 @@ gb_internal bool check_builtin_procedure(CheckerContext *c, Operand *operand, As // NOTE(bill): Is this even correct? new_type->Union.node = operand->expr; new_type->Union.scope = bt->Union.scope; + if (bt->Union.kind == UnionType_no_nil) { + new_type->Union.kind = UnionType_no_nil; + } operand->type = new_type; } |