aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 870f06dfe8..4f806b9e1b 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -2954,14 +2954,14 @@ bool handle_is_ptr(TypeTableEntry *type_entry) {
case TypeTableEntryIdArray:
case TypeTableEntryIdStruct:
case TypeTableEntryIdUnion:
- return true;
+ return type_has_bits(type_entry);
case TypeTableEntryIdErrorUnion:
return type_has_bits(type_entry->data.error.child_type);
case TypeTableEntryIdEnum:
assert(type_entry->data.enumeration.complete);
return type_entry->data.enumeration.gen_field_count != 0;
case TypeTableEntryIdMaybe:
- return !type_entry->data.maybe.child_type->zero_bits &&
+ return type_has_bits(type_entry->data.maybe.child_type) &&
type_entry->data.maybe.child_type->id != TypeTableEntryIdPointer &&
type_entry->data.maybe.child_type->id != TypeTableEntryIdFn;
case TypeTableEntryIdTypeDecl: