procedure Test_82 is
package pak1 is
type T1 is tagged null record;
end pak1;
package body pak1 is
-- type T1 is tagged null record; -- line 7
function "=" (x, y : T1'class) return boolean is -- line 9
begin
return true;
end "=";
procedure proc (x, y : T1'class) is
b : boolean;
begin
b := x = y; --ERROR: ambiguous "="
end proc;
end pak1;
begin
null;
end Test_82;
The compiler says nothing. When the declaration of T1 is moved to
line 7, we get the expected error message:
test_82.adb:17:17: ambiguous expression (cannot resolve ""="")
test_82.adb:17:17: possible interpretation at line 9
test_82.adb:17:17: possible interpretation at line 3
gnatmake: "test_82.adb" compilation error