diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-25 17:34:18 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-02-25 17:34:18 -0500 |
| commit | 704a8acb5997c7fdab4e29737fb398c022f876b7 (patch) | |
| tree | d09d20003e278d5adccfce7f69c347a2a75e4d2f /src/analyze.cpp | |
| parent | 83f89064490350991806aea02ea6ba4b948c0376 (diff) | |
| download | zig-704a8acb5997c7fdab4e29737fb398c022f876b7.tar.gz zig-704a8acb5997c7fdab4e29737fb398c022f876b7.zip | |
fix handle_is_ptr for promise type
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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) |
