aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-27 15:58:53 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-27 15:58:53 +0100
commit5df854fcef6d3c37f3703ed5568ef7de8ca6719e (patch)
treee48482df30b417f06cd819ffc722ad5bc2ea03e8 /src/types.cpp
parent260089431e069d2ce21ce74ff17c56c45fa7785e (diff)
Fixed demov0.5.0
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index 465f69048..ab6408b12 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -1083,6 +1083,12 @@ bool are_types_identical(Type *x, Type *y) {
}
switch (x->kind) {
+ case Type_Generic:
+ if (y->kind == Type_Generic) {
+ return true; // TODO(bill): Is this correct?
+ }
+ break;
+
case Type_Basic:
if (y->kind == Type_Basic) {
return x->Basic.kind == y->Basic.kind;
@@ -1321,6 +1327,7 @@ enum ProcTypeOverloadKind {
ProcOverload_ParamTypes,
ProcOverload_ResultCount,
ProcOverload_ResultTypes,
+ ProcOverload_Polymorphic,
ProcOverload_NotProcedure,
@@ -1340,6 +1347,10 @@ ProcTypeOverloadKind are_proc_types_overload_safe(Type *x, Type *y) {
// return ProcOverload_CallingConvention;
// }
+ if (px.is_generic != py.is_generic) {
+ return ProcOverload_Polymorphic;
+ }
+
if (px.param_count != py.param_count) {
return ProcOverload_ParamCount;
}