generic
package parent is
end parent;
generic
package parent.pak2 is
end parent.pak2;
generic
package parent.pak2.pak3 is
end parent.pak2.pak3;
with parent.pak2.pak3;
generic
package parent.pak2.pak4 is
package pak3 is new parent.pak2.pak3;
end parent.pak2.pak4;
with parent;
package pak1 is new parent;
with parent.pak2;
with pak1;
package pak6 is new pak1.pak2;
with parent.pak2.pak4;
with pak6;
package Test_4 is new pak6.pak4;
The above is a legal Ada program, but GNAT 3.15p and 3.4 both reject
it with:
test_4.ads:4:01: instantiation error at parent-pak2-pak4.ads:5
test_4.ads:4:01: "pak2" not declared in "pak1"
compilation abandoned due to previous error
gnatmake: "test_4.ads" compilation error