]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Further refine 'Super attribute
authorJustin Squirek <squirek@adacore.com>
Tue, 26 Mar 2024 15:02:58 +0000 (15:02 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Mon, 20 May 2024 07:47:05 +0000 (09:47 +0200)
This patch relaxes the restriction on 'Super such that it can apply to abstract
type objects.

gcc/ada/

* sem_attr.adb (Analyze_Attribute): Remove restriction on 'Super
for abstract types.

gcc/ada/sem_attr.adb

index df52229b6aafcb180cb1702d0a6d537a2d16b77d..403810c8b5ec097f887b57a3ffc2b5f70eee0d29 100644 (file)
@@ -6683,10 +6683,6 @@ package body Sem_Attr is
             elsif Depends_On_Private (P_Type) then
                Error_Attr_P ("prefix type of % is a private extension");
 
-            --  Check that we don't view convert to an abstract type
-
-            elsif Is_Abstract_Type (Node (First_Elmt (Parents))) then
-               Error_Attr_P ("type of % cannot be abstract");
             end if;
 
             --  Generate a view conversion and analyze it