|
@@ -694,7 +694,7 @@ gbString type_to_string (Type *type);
|
|
i64 type_size_of_internal(Type *t, TypePath *path);
|
|
i64 type_size_of_internal(Type *t, TypePath *path);
|
|
void init_map_internal_types(Type *type);
|
|
void init_map_internal_types(Type *type);
|
|
Type * bit_set_to_int(Type *t);
|
|
Type * bit_set_to_int(Type *t);
|
|
-bool are_types_identical(Type *x, Type *y);
|
|
|
|
|
|
+bool are_types_identical(Type *x, Type *y, bool check_tuple_names/*=false*/);
|
|
|
|
|
|
bool is_type_pointer(Type *t);
|
|
bool is_type_pointer(Type *t);
|
|
bool is_type_proc(Type *t);
|
|
bool is_type_proc(Type *t);
|
|
@@ -2338,7 +2338,7 @@ Type *strip_type_aliasing(Type *x) {
|
|
return x;
|
|
return x;
|
|
}
|
|
}
|
|
|
|
|
|
-bool are_types_identical(Type *x, Type *y) {
|
|
|
|
|
|
+bool are_types_identical(Type *x, Type *y, bool check_tuple_names) {
|
|
if (x == y) {
|
|
if (x == y) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
@@ -2487,6 +2487,11 @@ bool are_types_identical(Type *x, Type *y) {
|
|
if (xe->kind != ye->kind || !are_types_identical(xe->type, ye->type)) {
|
|
if (xe->kind != ye->kind || !are_types_identical(xe->type, ye->type)) {
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ if (check_tuple_names) {
|
|
|
|
+ if (xe->token.string != ye->token.string) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (xe->kind == Entity_Constant && !compare_exact_values(Token_CmpEq, xe->Constant.value, ye->Constant.value)) {
|
|
if (xe->kind == Entity_Constant && !compare_exact_values(Token_CmpEq, xe->Constant.value, ye->Constant.value)) {
|
|
// NOTE(bill): This is needed for polymorphic procedures
|
|
// NOTE(bill): This is needed for polymorphic procedures
|
|
return false;
|
|
return false;
|