From 704a8acb5997c7fdab4e29737fb398c022f876b7 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 25 Feb 2018 17:34:18 -0500 Subject: fix handle_is_ptr for promise type --- src/analyze.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index 2787906c64..a4bb98cad6 100644 --- 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) -- cgit v1.2.3