This occurs when the call is to a function that is declared in a package
that is nested in the scope where the type declaration is located.
gcc/ada/ChangeLog:
* freeze.adb (Freeze_Expression.In_Expanded_Body): Also return True
for the body of a helper/wrapper built for class-wide preconditions.
then
return True;
+ -- This is the body of a helper/wrapper built for CW preconditions
+
+ elsif Present (Corresponding_Spec (P))
+ and then
+ Present (Class_Preconditions_Subprogram (Corresponding_Spec (P)))
+ then
+ return True;
+
else
Id := Defining_Unit_Name (Specification (P));