From afea221d64670dcf3cf4a79695c4ae95eeef77a9 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 21 Nov 2022 13:10:49 +0000 Subject: [PATCH] Make structs with the same fields but different tags different types Fixes #2105 --- src/types.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/types.cpp b/src/types.cpp index 516096743..28628fd97 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -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) {