Skip to content

Commit 704a8ac

Browse files
committed
fix handle_is_ptr for promise type
1 parent 83f8906 commit 704a8ac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/analyze.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4191,8 +4191,7 @@ bool handle_is_ptr(TypeTableEntry *type_entry) {
41914191
return type_has_bits(type_entry->data.error_union.payload_type);
41924192
case TypeTableEntryIdMaybe:
41934193
return type_has_bits(type_entry->data.maybe.child_type) &&
4194-
type_entry->data.maybe.child_type->id != TypeTableEntryIdPointer &&
4195-
type_entry->data.maybe.child_type->id != TypeTableEntryIdFn;
4194+
!type_is_codegen_pointer(type_entry->data.maybe.child_type);
41964195
case TypeTableEntryIdUnion:
41974196
assert(type_entry->data.unionation.complete);
41984197
if (type_entry->data.unionation.gen_field_count == 0)

0 commit comments

Comments
 (0)