This commit is contained in:
Ivan Bondarev 2024-01-14 12:07:16 +01:00
parent 564ece3614
commit acc6458a82
3 changed files with 13 additions and 1 deletions

BIN
TestSuite/l2.dll Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
{$reference l2.dll}
begin
l2.t2.m1;
assert(l2.t2.i = 1);
end.

View file

@ -2233,7 +2233,13 @@ namespace PascalABCCompiler.TreeConverter
}
continue;
}
set_of_possible_functions.Add(fn);
else if ((func = find_eq_method_in_list(fn, set_of_possible_functions)) != null)
{
if (!(fn is compiled_function_node cfn && func is compiled_function_node cfn2 && (cfn.polymorphic_state == polymorphic_state.ps_static || cfn2.polymorphic_state == polymorphic_state.ps_static)))
set_of_possible_functions.Add(fn);
}
else
set_of_possible_functions.Add(fn);
}
}
if (parameters.Count > fn.parameters.Count)