2 -- { dg-options "-gnatws" }
4 with Ada
.Tags
.Generic_Dispatching_Constructor
; use Ada
.Tags
;
5 package body abstract1
is
7 function New_T
(Stream
: not null access Root_Stream_Type
'Class)
10 new Generic_Dispatching_Constructor
(T
, Root_Stream_Type
'Class, Input
);
11 E
: constant String := String'Input (Stream
);
12 I
: constant Tag
:= Internal_Tag
(E
);
15 return Construct
(I
, Stream
);
18 function Input
(Stream
: not null access Root_Stream_Type
'Class)
22 Integer'Read (Stream
, O
.I
);
26 function Input
(Stream
: not null access Root_Stream_Type
'Class)
30 Float'Read (Stream
, O
.F
);