comp.lang.ada
 help / color / mirror / Atom feed
* Disambiguation
@ 2005-06-24 12:00 Alex R. Mosteo
  2005-06-24 12:12 ` Disambiguation Duncan Sands
  2005-06-25  5:56 ` Disambiguation Jeffrey Carter
  0 siblings, 2 replies; 5+ messages in thread
From: Alex R. Mosteo @ 2005-06-24 12:00 UTC (permalink / raw)


Hello, see this test program:

procedure Test_Ambig is

    type X is (Data, Meta);

    procedure Foo (Data : in Natural) is
       Z : constant X := Meta;
    begin
       case Z is
--         when Data     => null;
--         when X'(Data) => null;
--         when X.Data   => null;
--         when X (Data) => null;
          when Meta       => null;
       end case;
    end Foo;

begin
    null;
end Test_Ambig;

-----

I've tried the four commented lines (though I'm pretty sure three of 
them don't make sense) to get this to compile with Gnat for linux (3.4.2 
and all GAP releases). I think this is one of these cases where the 
answer is obvious but you need the eyes of other person. Is there some 
way to qualify "Data" as the enumeration type instead of the procedure 
parameter? Or is this simply a no-no caused by hiding? Thanks!



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-06-25  5:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-24 12:00 Disambiguation Alex R. Mosteo
2005-06-24 12:12 ` Disambiguation Duncan Sands
2005-06-24 12:48   ` Disambiguation Alex R. Mosteo
2005-06-24 18:19   ` Disambiguation Martin Dowie
2005-06-25  5:56 ` Disambiguation Jeffrey Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox