mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Fix procedure overloading distinguishing
This commit is contained in:
+5
-4
@@ -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));
|
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
|
||||||
is_invalid = true;
|
is_invalid = true;
|
||||||
break;
|
break;
|
||||||
case ProcOverload_CallingConvention:
|
// case ProcOverload_CallingConvention:
|
||||||
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
|
// error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
|
||||||
is_invalid = true;
|
// is_invalid = true;
|
||||||
break;
|
// break;
|
||||||
case ProcOverload_ParamVariadic:
|
case ProcOverload_ParamVariadic:
|
||||||
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
|
error(p->token, "Overloaded procedure `%.*s` as the same type as another procedure in this scope", LIT(name));
|
||||||
is_invalid = true;
|
is_invalid = true;
|
||||||
@@ -1377,6 +1377,7 @@ void check_procedure_overloading(Checker *c, Entity *e) {
|
|||||||
case ProcOverload_ParamTypes:
|
case ProcOverload_ParamTypes:
|
||||||
// This is okay :)
|
// This is okay :)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_invalid) {
|
if (is_invalid) {
|
||||||
|
|||||||
+3
-3
@@ -1173,9 +1173,9 @@ ProcTypeOverloadKind are_proc_types_overload_safe(Type *x, Type *y) {
|
|||||||
TypeProc px = base_type(x)->Proc;
|
TypeProc px = base_type(x)->Proc;
|
||||||
TypeProc py = base_type(y)->Proc;
|
TypeProc py = base_type(y)->Proc;
|
||||||
|
|
||||||
if (px.calling_convention != py.calling_convention) {
|
// if (px.calling_convention != py.calling_convention) {
|
||||||
return ProcOverload_CallingConvention;
|
// return ProcOverload_CallingConvention;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (px.param_count != py.param_count) {
|
if (px.param_count != py.param_count) {
|
||||||
return ProcOverload_ParamCount;
|
return ProcOverload_ParamCount;
|
||||||
|
|||||||
Reference in New Issue
Block a user