From: Christoph Grein <christoph.grein@eurocopter.com>
Subject: Re: It seems bug in GNAT with overloading in assignment
Date: Mon, 25 Feb 2002 10:37:12 +0100 (MET)
Date: 2002-02-25T10:37:12+01:00 [thread overview]
Message-ID: <mailman.1014629941.16415.comp.lang.ada@ada.eu.org> (raw)
This is definitely a Gnat bug, ObjectAda is correct.
Report it to report@gnat.com (not sure whether email address is correct).
> Trying to understand overloading rules I wrote a following test.
> I would like to see what error compiler reported.
> But it didn't report any error. I tried with 3.13p and 3.14p
> for Windows.
> Then I setup ObjectAda to tried with it. ObjectAda
> reported "Ambiguous assignment".
> Finally I removed Dummy parameter from function declaration
> and gnat crashed with message "GNAT BUG DETECTED"
>
> Here is the test:
> ------ test.adb
> with Ada.Text_IO;
>
> procedure Test is
>
> type Int_A is new Integer;
> type Int_B is new Integer;
>
> type Int_A_Ptr is access all Int_A;
> type Int_B_Ptr is access all Int_B;
>
> function X (Dummy : Integer) return Int_A_Ptr is
> begin
> Ada.Text_IO.Put_Line ("First interpretation");
> return null;
> end X;
>
> function X (Dummy : Integer) return Int_B_Ptr is
> begin
> Ada.Text_IO.Put_Line ("Second interpretation");
> return null;
> end X;
> begin
> X (1).all := 1; -- Ambiguous assignment
> end Test;
Rational messages:
10:36:17 *** X (1).all := 1; is ambiguous
10:36:17 *** X could be (in OVERLOAD) X
10:36:17 *** X could be (in OVERLOAD) X
next reply other threads:[~2002-02-25 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-25 9:37 Christoph Grein [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-25 8:59 It seems bug in GNAT with overloading in assignment Maxim Reznik 2147483647
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox