aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-01-22 10:38:23 +0000
committerGitHub <noreply@github.com>2025-01-22 10:38:23 +0000
commit36e86ba552afeaeb0c54fa43bcffa37562521ff3 (patch)
tree8982172ff665e78b7935b808f474db97abbb4af0 /src/types.cpp
parent2619167fd0d38c2703e5d03c0273ab6e4c39c629 (diff)
parente85667c95cdd9c61dccd1e1b747aa07889edcd6a (diff)
Merge pull request #4739 from jasonKercher/fix-4738
fix compiler crash on assigning a variable to an unresolved bit_set
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 233f903a3..0b6e6d334 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -4773,7 +4773,9 @@ gb_internal gbString write_type_to_string(gbString str, Type *type, bool shortha
case Type_BitSet:
str = gb_string_appendc(str, "bit_set[");
- if (is_type_enum(type->BitSet.elem)) {
+ if (type->BitSet.elem == nullptr) {
+ str = gb_string_appendc(str, "<unresolved>");
+ } else if (is_type_enum(type->BitSet.elem)) {
str = write_type_to_string(str, type->BitSet.elem);
} else {
str = gb_string_append_fmt(str, "%lld", type->BitSet.lower);