aggr25.adb
85 Bytes
-
[Ada] Spurious error on aggregate with choice that is predicted subtype · 7145d799
This patch fixes a spurious error on a record aggregate for a variant record when a choice in the aggregate is given by a subtype with a static predicate. The same expansion mechanism for such a variant, used in case statements, must be used here as well. 2019-07-05 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_util.adb (Encloing_Subprogram): If Enclosing_Dynamic_Scope is a loop, continue climbing the scope stack to find the enclosing subprogram. (Gather_Components): Handle properly a choice in a record aggregate that is given by a subtype with a static predicate. gcc/testsuite/ * gnat.dg/aggr25.adb, gnat.dg/aggr25.ads: New testcase. From-SVN: r273112
Ed Schonberg committed