1-- { dg-do compile } 2-- { dg-options "-gnatws" } 3 4package body Discr8 is 5 6 procedure Make (C : out Local_T) is 7 Tmp : Local_T (Tag_One); 8 begin 9 C := Tmp; 10 end; 11 12 package Iteration is 13 14 type Message_T is 15 record 16 S : Local_T; 17 end record; 18 19 type Iterator_T is 20 record 21 S : Local_T; 22 end record; 23 24 type Access_Iterator_T is access Iterator_T; 25 26 end Iteration; 27 28 package body Iteration is 29 30 procedure Construct (Iterator : in out Access_Iterator_T; 31 Message : Message_T) is 32 begin 33 Iterator.S := Message.S; 34 end; 35 36 end Iteration; 37 38end Discr8; 39