Fix polymorphic constant parameters for procedures

This commit is contained in:
gingerBill
2018-09-11 11:09:42 +01:00
parent 91477e9e69
commit 787ea1feba
2 changed files with 10 additions and 1 deletions

View File

@@ -1396,6 +1396,10 @@ bool are_types_identical(Type *x, Type *y) {
if (xe->kind != ye->kind || !are_types_identical(xe->type, ye->type)) {
return false;
}
if (xe->kind == Entity_Constant && !compare_exact_values(Token_CmpEq, xe->Constant.value, ye->Constant.value)) {
// NOTE(bill): This is needed for polymorphic procedures
return false;
}
}
return true;
}