aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/types.cpp b/src/types.cpp
index d49dd6a86..8d7466a32 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -1354,15 +1354,14 @@ ProcTypeOverloadKind are_proc_types_overload_safe(Type *x, Type *y) {
TypeProc py = base_type(y)->Proc;
- if (px.is_polymorphic != py.is_polymorphic) {
- return ProcOverload_Polymorphic;
- }
-
-
// if (px.calling_convention != py.calling_convention) {
// return ProcOverload_CallingConvention;
// }
+ // if (px.is_polymorphic != py.is_polymorphic) {
+ // return ProcOverload_Polymorphic;
+ // }
+
if (px.param_count != py.param_count) {
return ProcOverload_ParamCount;
}
@@ -1379,6 +1378,11 @@ ProcTypeOverloadKind are_proc_types_overload_safe(Type *x, Type *y) {
return ProcOverload_ParamVariadic;
}
+
+ if (px.is_polymorphic != py.is_polymorphic) {
+ return ProcOverload_Polymorphic;
+ }
+
if (px.result_count != py.result_count) {
return ProcOverload_ResultCount;
}
@@ -2448,12 +2452,12 @@ gbString write_type_to_string(gbString str, Type *type) {
}
} else {
GB_ASSERT(var->kind == Entity_TypeName);
- #if 0
- str = gb_string_appendc(str, "type/");
- str = write_type_to_string(str, var->type);
- #else
- str = gb_string_appendc(str, "type");
- #endif
+ if (var->type->kind == Type_Generic) {
+ str = gb_string_appendc(str, "type/");
+ str = write_type_to_string(str, var->type);
+ } else {
+ str = gb_string_appendc(str, "type");
+ }
}
}
}