1package other_pkg is 2 type rec_t is record 3 field : integer; 4 end record; 5end package; 6 7package body other_pkg is 8end package body; 9 10package pkg is 11 type prot_t is protected 12 end protected; 13end package; 14 15-- Uncomment to make it work. 16-- library library_name; 17 18use work.other_pkg.all; 19 20package body pkg is 21 type prot_t is protected body 22 variable rec : rec_t; 23 procedure method is 24 begin 25 report integer'image(rec.field); 26 end procedure; 27 end protected body; 28end package body; 29