aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-01-28 00:08:24 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-16 10:30:58 +0200
commitbac7eb85ef0caca4e55b362f688776dbea14feb9 (patch)
treebf09d1c352198227391f0d5d262541302a9c030f /gcc/ada/sem_res.adb
parent072861beb9bcc6cbf2e16aafe6b0aae049d60989 (diff)
downloadgcc-bac7eb85ef0caca4e55b362f688776dbea14feb9.zip
gcc-bac7eb85ef0caca4e55b362f688776dbea14feb9.tar.gz
gcc-bac7eb85ef0caca4e55b362f688776dbea14feb9.tar.bz2
ada: Implement inheritance of user-defined literal aspects for untagged types
In Ada 2022, user-defined literal aspects are nonoverridable but the named subprograms present in them can be overridden, including for untagged types. gcc/ada/ * sem_res.adb (Has_Applicable_User_Defined_Literal): Apply the same processing for derived untagged types as for tagged types. * sem_util.ads (Corresponding_Primitive_Op): Adjust description. * sem_util.adb (Corresponding_Primitive_Op): Handle untagged types.
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb1
1 files changed, 0 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index df9ccb1..f6634da 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -492,7 +492,6 @@ package body Sem_Res is
Name := Make_Identifier (Loc, Chars (Callee));
if Is_Derived_Type (Typ)
- and then Is_Tagged_Type (Typ)
and then Base_Type (Etype (Callee)) /= Base_Type (Typ)
then
Callee :=