aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-09-11 11:09:42 +0100
committergingerBill <bill@gingerbill.org>2018-09-11 11:09:42 +0100
commit787ea1feba6cf7ce562cd5698efc4c6906bf1669 (patch)
treedd7f64ed11200bca93c31b0804426d0a026fb22c /src/types.cpp
parent91477e9e69aa6027953702a4c5ca5f6cda7e0ed8 (diff)
Fix polymorphic constant parameters for procedures
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.cpp b/src/types.cpp
index c4a062421..14b2e449e 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -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;
}