-- RM95 3.7(14) -- If the parent type is not a tagged type, then each -- discriminant of the derived type shall be used in -- the constraint defining the parent subtype; generic type T1 is private; package Test_247013 is type T2 (x: integer) is new T1; -- ERROR: x not used end Test_247013; I expect an error message like this: test_247013.ads:8:11: Discriminant "x" is not used to constrain the parent subtype "T1" (RM 3.7(14)) But the compiler says nothing
Confirmed.
Confirmed on 4.3.0 20071213
Confirmed on 4.4.1.
confirmed 4.6.1
confirm 4.9-20140218
The error is reported on the instantiation.