3 procedure Private_Overriding
is
7 type Bar
is abstract tagged null record;
9 procedure Overloaded_Subprogram
13 procedure Overloaded_Subprogram
18 procedure Not_Overloaded_Subprogram
23 type Baz
is new Bar
with null record;
24 -- promise to override both overloaded subprograms,
25 -- shouldn't matter that they're defined in the private part,
27 private -- workaround: override in the public view
30 procedure Overloaded_Subprogram
35 procedure Overloaded_Subprogram
41 procedure Not_Overloaded_Subprogram
50 -- this is allowed, as expected
51 Foo
.Not_Overloaded_Subprogram
(Qux
);
52 Foo
.Overloaded_Subprogram
(Qux
);
53 Foo
.Overloaded_Subprogram
(Foo
.Baz
'Class(Qux
));
54 Foo
.Overloaded_Subprogram
(Foo
.Bar
'Class(Qux
));
56 -- however, using object-dot notation
57 Qux
.Not_Overloaded_Subprogram
; -- this is allowed
58 Qux
.Overloaded_Subprogram
; -- "no selector..."
59 Foo
.Baz
'Class(Qux
).Overloaded_Subprogram
; -- "no selector..."
60 Foo
.Bar
'Class(Qux
).Overloaded_Subprogram
; -- this is allowed
62 end Private_Overriding
;