[Ada] Spurious warning when using 'Type_Key on generic formal

gcc/ada/

	* sem_attr.adb (Type_Key): Avoid premature use warnings when the
	prefix is a generic actual.
This commit is contained in:
Justin Squirek 2021-11-16 10:50:06 -05:00 committed by Pierre-Marie de Rodat
parent 8ba38e8c8b
commit b940999de4
1 changed files with 1 additions and 0 deletions

View File

@ -6664,6 +6664,7 @@ package body Sem_Attr is
if not Is_Frozen (Entity (P))
and then not Is_Generic_Type (Entity (P))
and then not Is_Generic_Actual_Type (Entity (P))
then
Error_Msg_N ("premature usage of Type_Key?", N);
end if;