This commit is contained in:
parent
7f2776dbe3
commit
c79e262327
13
TestSuite/operators2.pas
Normal file
13
TestSuite/operators2.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
type
|
||||||
|
t1 = class
|
||||||
|
|
||||||
|
static function operator=(a,b: t1) := true;
|
||||||
|
|
||||||
|
end;
|
||||||
|
t2 = class(t1) end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
var a := new t2;
|
||||||
|
var b := new t2;
|
||||||
|
assert(a = b);
|
||||||
|
end.
|
||||||
|
|
@ -2799,6 +2799,13 @@ namespace PascalABCCompiler.TreeConverter
|
||||||
return set_of_possible_functions[0];
|
return set_of_possible_functions[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (set_of_possible_functions.Count == 2)
|
||||||
|
{
|
||||||
|
if (set_of_possible_functions[0].semantic_node_type == semantic_node_type.basic_function_node && set_of_possible_functions[1].semantic_node_type != semantic_node_type.basic_function_node)
|
||||||
|
return set_of_possible_functions[1];
|
||||||
|
else if (set_of_possible_functions[1].semantic_node_type == semantic_node_type.basic_function_node && set_of_possible_functions[0].semantic_node_type != semantic_node_type.basic_function_node)
|
||||||
|
return set_of_possible_functions[0];
|
||||||
|
}
|
||||||
|
|
||||||
return AddError<function_node>(new SeveralFunctionsCanBeCalled(loc, set_of_possible_functions));
|
return AddError<function_node>(new SeveralFunctionsCanBeCalled(loc, set_of_possible_functions));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue