From 2d26278a658211a9ce6cf6c9d1a8be16ba0e23cb Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 9 Aug 2019 22:52:19 +0100 Subject: Make structs with the same fields but with different tags distinct types --- src/types.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/types.cpp') diff --git a/src/types.cpp b/src/types.cpp index 1197ba974..4404882a9 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1712,6 +1712,12 @@ bool are_types_identical(Type *x, Type *y) { if (xf_is_using ^ yf_is_using) { return false; } + if (x->Struct.tags.count != y->Struct.tags.count) { + return false; + } + if (x->Struct.tags.count > 0 && x->Struct.tags[i] != y->Struct.tags[i]) { + return false; + } } return true; } -- cgit v1.2.3