| 1 |
-- { dg-do compile } |
| 2 |
|
| 3 |
with Generic_Inst10_Pkg; use Generic_Inst10_Pkg; |
| 4 |
|
| 5 |
procedure Generic_Inst10 is |
| 6 |
|
| 7 |
function Image (S : XString) return String is (S.To_String); |
| 8 |
|
| 9 |
generic |
| 10 |
type Left_Type (<>) is private; |
| 11 |
type Right_Type (<>) is private; |
| 12 |
with function Image (L : Left_Type) return String is <>; |
| 13 |
with function Image (L : Right_Type) return String is <>; |
| 14 |
procedure G (Left : Left_Type; Right : Right_Type); |
| 15 |
|
| 16 |
procedure G (Left : Left_Type; Right : Right_Type) is |
| 17 |
A : String := Image (Left) & Image (Right); |
| 18 |
begin |
| 19 |
null; |
| 20 |
end; |
| 21 |
|
| 22 |
procedure My_G is new G (XString, XString); |
| 23 |
|
| 24 |
begin |
| 25 |
null; |
| 26 |
end; |