comp.lang.ada
 help / color / mirror / Atom feed
From: Alan Paterson <paterson@dial.eunet.ch>
Subject: Ambiguity detected - Why?
Date: 1996/06/05
Date: 1996-06-05T00:00:00+00:00	[thread overview]
Message-ID: <31B590D2.4193@dial.eunet.ch> (raw)


The following results when compiling using DECAda/VMS. We cannot understand why 
the compiler finds the marked call ambiguous. Can anyone explain it?

      1 procedure AMBIGUITY_TEST is
      2 --
      3    type T_ENUM is (A, B, C);
      4 --
      5    type T_ENUM_ARR is array(POSITIVE range <>) of T_ENUM;
      6 --
      7 -- 
-----------------------------------------------------------------------------
      8    procedure PROC(
      9                 PARA : in STRING) is
     10    begin
     11       null;
     12    end PROC;
     13 -- 
-----------------------------------------------------------------------------
     14    procedure PROC(
     15                 PARA : in T_ENUM_ARR) is
     16    begin
     17       null;
     18    end PROC;
     19 -- 
-----------------------------------------------------------------------------
     20 --
     21 begin
     22    PROC((A, B));
...............1
%ADAC-E-AMBIGRSL, (1) Ambiguity detected during overload resolution [LRM 8.7]
%ADAC-I-SUPPMEAN, (1) For procedure call PROC the meanings considered are
            call of procedure body PROC (STRING) declared at line 8
            call of procedure body PROC (T_ENUM_ARR) declared at line 14
        For array aggregate the result type is any non-limited array or record 
type

     23    PROC("(A, B)");
     24    PROC(T_ENUM_ARR'(A, B));
     25 end AMBIGUITY_TEST;


-- 
Alan Paterson
Berne, Switzerland




             reply	other threads:[~1996-06-05  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-05  0:00 Alan Paterson [this message]
1996-06-06  0:00 ` Ambiguity detected - Why? Adam Beneschan
1996-06-06  0:00 ` 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