blob: bad9ee69874bcbcf9c478fdb16f32d330ec29a8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
with Ada.Streams; use Ada.Streams;
package abstract1 is
type T is abstract tagged limited null record;
function Input (Stream : not null access Root_Stream_Type'Class) return T
is abstract;
function New_T (Stream : not null access Root_Stream_Type'Class)
return T'Class;
type IT is limited new T with record
I : Integer;
end record;
function Input (Stream : not null access Root_Stream_Type'Class) return IT;
type FT is limited new T with record
F : Float;
end record;
function Input (Stream : not null access Root_Stream_Type'Class) return FT;
end abstract1;
|