comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Unclear error message - please help
Date: Sun, 18 Sep 2005 00:02:49 +0200
Date: 2005-09-18T00:02:49+02:00	[thread overview]
Message-ID: <87k6hf9wty.fsf@ludovic-brenta.org> (raw)
In-Reply-To: 432C8690.C37D4AE0@alfred-hilscher.de

Alfred Hilscher <SPAM@alfred-hilscher.de> writes:
> The compiler says, that the procedure call is ambigous, but I think, it
> is clear, that "Proc" from line 2 should be used, as it has parameters
> (in, out, in) while "Proc" from line 4 has (in, out, out). And the value
> (2507) in the call of "Proc" can not be used as an "out" parameter. It
> this a know error, or do I have strong misunderstandings there?
>
> pkgtest.adb:15:03: ambiguous expression (cannot resolve "Proc")
> pkgtest.adb:15:03: possible interpretation at pkg.ads:4
> pkgtest.adb:15:03: possible interpretation at pkg.ads:2

The compiler is correct, because the mode (in, out or in out) is not
considered when resolving overloading.  See the Annotated (not plain)
Ada Reference Manual, 6.4.1(5).

You can resolve the overloading by using named parameter association:

  Proc (Host => Argument (1), RC => RC, Identifier => 2507);


-- 
Ludovic Brenta.



  parent reply	other threads:[~2005-09-17 22:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-17 21:11 Unclear error message - please help Alfred Hilscher
2005-09-17 21:44 ` Gene
2005-09-17 22:02 ` Ludovic Brenta [this message]
2005-09-18  2:32 ` Robert A Duff
2005-10-08 19:39   ` Alfred Hilscher
2005-10-08 20:15     ` Björn Persson
2005-10-09  7:34       ` Martin Krischik
2005-10-08 21:28     ` Dmitry A. Kazakov
2005-10-08 23:58     ` Robert A Duff
2005-10-09  7:29     ` Martin Krischik
2005-10-09 14:24       ` Robert A Duff
2005-10-09 22:02       ` Brian May
2005-10-10 16:49         ` Martin Krischik
2005-10-10 22:20           ` Brian May
2005-10-11  5:48             ` Martin Dowie
2005-10-11 18:03             ` Martin Krischik
     [not found]         ` <h84lk1tqgofrhgabm8q3sqbb80li6733bh@4ax.com>
2005-10-16  1:10           ` Robert A Duff
replies disabled

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