Fix overloading bug due to comparison of named types

This commit is contained in:
Ginger Bill
2017-02-18 22:19:35 +00:00
parent 9ff474f387
commit 0c37aa9ea0
5 changed files with 29 additions and 21 deletions
+3
View File
@@ -1242,6 +1242,9 @@ void check_procedure_overloading(Checker *c, Entity *e) {
ProcTypeOverloadKind kind = are_proc_types_overload_safe(p->type, q->type);
switch (kind) {
case ProcOverload_Identical:
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
is_invalid = true;
break;
case ProcOverload_CallingConvention:
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
is_invalid = true;