Make structs with the same fields but different tags different types

Fixes #2105
This commit is contained in:
gingerBill
2022-11-21 13:10:49 +00:00
parent b9ec2de4db
commit afea221d64

View File

@@ -2705,6 +2705,9 @@ bool are_types_identical_internal(Type *x, Type *y, bool check_tuple_names) {
if (xf->token.string != yf->token.string) {
return false;
}
if (x->Struct.tags[i] != y->Struct.tags[i]) {
return false;
}
u64 xf_flags = (xf->flags&EntityFlags_IsSubtype);
u64 yf_flags = (yf->flags&EntityFlags_IsSubtype);
if (xf_flags != yf_flags) {