ada: Fix wrong resolution for hidden discriminant in predicate
commit8957121b8bf4be7eb7f9de31b810ea01594a670e
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 2 Jul 2023 22:33:18 +0000 (3 00:33 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 11 Jul 2023 09:24:28 +0000 (11 11:24 +0200)
tree825b70cf48c020fe3c2b16c8579c08a1f9f84d88
parent312839653b8295599c63cae90278a87af528edad
ada: Fix wrong resolution for hidden discriminant in predicate

The problem occurs for hidden discriminants of private discriminated types.

gcc/ada/

* sem_ch13.adb (Replace_Type_References_Generic.Visible_Component):
In the case of private discriminated types, return a discriminant
only if it is listed in the discriminant part of the declaration.
gcc/ada/sem_ch13.adb