diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-02-18 22:19:35 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-02-18 22:19:35 +0000 |
| commit | 0c37aa9ea0271ddd8c93ea65f76d2f9ef4d777c5 (patch) | |
| tree | d3a8907ca922e4e5c0b4439b3d6a043baa8a481b /src/checker.c | |
| parent | 9ff474f387f8cfb2b0ee780034c584aabccb9248 (diff) | |
Fix overloading bug due to comparison of named types
Diffstat (limited to 'src/checker.c')
| -rw-r--r-- | src/checker.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/checker.c b/src/checker.c index 0b3c66166..e44fd1a77 100644 --- a/src/checker.c +++ b/src/checker.c @@ -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; |