commit 704a8acb5997c7fdab4e29737fb398c022f876b7 (tree)
parent 83f89064490350991806aea02ea6ba4b948c0376
Author: Andrew Kelley <superjoe30@gmail.com>
Date: Sun, 25 Feb 2018 17:34:18 -0500
fix handle_is_ptr for promise type
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/analyze.cpp b/src/analyze.cpp
@@ -4191,8 +4191,7 @@ bool handle_is_ptr(TypeTableEntry *type_entry) {
return type_has_bits(type_entry->data.error_union.payload_type);
case TypeTableEntryIdMaybe:
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;
+ !type_is_codegen_pointer(type_entry->data.maybe.child_type);
case TypeTableEntryIdUnion:
assert(type_entry->data.unionation.complete);
if (type_entry->data.unionation.gen_field_count == 0)