From 98dbbf11f3e19fefc08a34ba0f9a5a96e083ea78 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 28 May 2017 18:51:42 +0100 Subject: [PATCH] Fix procedure overloading distinguishing --- src/checker.c | 9 +++++---- src/types.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/checker.c b/src/checker.c index 709a5ce29..ecd13eb36 100644 --- a/src/checker.c +++ b/src/checker.c @@ -1360,10 +1360,10 @@ void check_procedure_overloading(Checker *c, Entity *e) { 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; - 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; + // break; case ProcOverload_ParamVariadic: error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name)); is_invalid = true; @@ -1377,6 +1377,7 @@ void check_procedure_overloading(Checker *c, Entity *e) { case ProcOverload_ParamTypes: // This is okay :) break; + } if (is_invalid) { diff --git a/src/types.c b/src/types.c index e1cde37c2..bf699ecba 100644 --- a/src/types.c +++ b/src/types.c @@ -1173,9 +1173,9 @@ ProcTypeOverloadKind are_proc_types_overload_safe(Type *x, Type *y) { TypeProc px = base_type(x)->Proc; TypeProc py = base_type(y)->Proc; - if (px.calling_convention != py.calling_convention) { - return ProcOverload_CallingConvention; - } + // if (px.calling_convention != py.calling_convention) { + // return ProcOverload_CallingConvention; + // } if (px.param_count != py.param_count) { return ProcOverload_ParamCount;