1 -- This test is related to sync_tag_limited in that previous versions of GNAT
2 -- failed to consider a synchronized private extension as limited if it was
3 -- not derrived from a synchronized interface (i.e. a limited interface). Since
4 -- such a private type would not be considered limited, GNAT would fail to
5 -- correctly build the expected discriminals later needed by the creation of
6 -- the concurrent type's "corresponding record type", leading to a compilation
7 -- error where the discriminants of the corresponding record type had no
10 -- This test is in addition to sync_tag_limited because the sync_tag_limited
11 -- would fail for "legality" reasons (default discriminants not allowed for
12 -- a non-limited taged type). It is also an opportunity to ensure that non-
13 -- defaulted discriminated synchronized private extensions work as expected.
17 procedure Sync_Tag_Discriminals
is
21 type Test_Interface
is limited interface
;
23 procedure Interface_Action
(Test
: in out Test_Interface
) is abstract;
28 package Implementation
is
29 type Test_Implementation
30 (Constraint
: Positive) is
31 synchronized
new Ifaces
.Test_Interface
with private;
34 protected type Test_Implementation
35 (Constraint
: Positive)
36 is new Ifaces
.Test_Interface
with
38 overriding
procedure Interface_Action
;
40 end Test_Implementation
;
43 package body Implementation
is
44 protected body Test_Implementation
is
45 procedure Interface_Action
is null;
51 end Sync_Tag_Discriminals
;