This commit is contained in:
miks1965 2018-10-31 20:46:54 +03:00
parent 94dc715c40
commit 033e26e984
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,10 @@
type
t1=class
static function operator=(a,b: t1): word := 5;
end;
begin
var a := new t1;
var b := new t1;
var c := a=b;//Ошибка: Несколько подпрограмм могут быть вызваны
end.

View file

@ -603,6 +603,10 @@ namespace PascalABCCompiler.TreeRealization
{
return type_compare.non_comparable_type;
}
if (tins.Length == 1 && tins[0].this_to_another != null && tins[0].this_to_another.is_explicit) // SSM bug fix #1441
{
return type_compare.non_comparable_type;
}
if (tins.Length == 1)
{
return tins[0].type_compare;