behavior tests passing again

This commit is contained in:
Andrew Kelley 2019-04-02 17:25:44 -04:00
parent 4c38a8cce1
commit cb0241fe44
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -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();