Fixed demo

This commit is contained in:
Ginger Bill
2017-06-27 15:58:53 +01:00
parent 260089431e
commit 5df854fcef
4 changed files with 65 additions and 39 deletions
+11
View File
@@ -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;
}