diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-04-02 17:25:44 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-04-02 18:31:19 -0400 |
| commit | cb0241fe44e347bd14fd5568a240f1237dafacc3 (patch) | |
| tree | 58a9c886b11164b21365a155037e67bfe4280432 /src | |
| parent | 4c38a8cce17979a9e8ce15c8ccfe1b7ccdb59832 (diff) | |
| download | zig-cb0241fe44e347bd14fd5568a240f1237dafacc3.tar.gz zig-cb0241fe44e347bd14fd5568a240f1237dafacc3.zip | |
behavior tests passing again
Diffstat (limited to 'src')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index ba664fc19e..c3fb774a50 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -4047,7 +4047,6 @@ bool handle_is_ptr(ZigType *type_entry) { return false; case ZigTypeIdArray: case ZigTypeIdStruct: - case ZigTypeIdUnion: return type_has_bits(type_entry); case ZigTypeIdErrorUnion: return type_has_bits(type_entry->data.error_union.payload_type); @@ -4055,6 +4054,8 @@ bool handle_is_ptr(ZigType *type_entry) { return type_has_bits(type_entry->data.maybe.child_type) && !type_is_nonnull_ptr(type_entry->data.maybe.child_type) && type_entry->data.maybe.child_type->id != ZigTypeIdErrorSet; + case ZigTypeIdUnion: + return type_has_bits(type_entry) && type_entry->data.unionation.gen_field_count != 0; } zig_unreachable(); |
