comp.lang.ada
 help / color / mirror / Atom feed
From: Victor Porton <porton@narod.ru>
Subject: Re: Trouble with "operation can be dispatching in only one type"
Date: Wed, 13 Aug 2014 22:44:06 +0300
Date: 2014-08-13T22:44:06+03:00	[thread overview]
Message-ID: <lsgf68$ivf$1@speranza.aioe.org> (raw)
In-Reply-To: lsgdvt$g4h$1@speranza.aioe.org

Victor Porton wrote:

> I defined two tagged types T1 and T2 in some package.
> 
> I need a function in the same package:
> 
> not overriding function F (Stack: T1) return T2;
> 
> The compiler complaints:
> 
> operation can be dispatching in only one type
> 
> My current workaround is to define it instead as:
> 
> not overriding function F (Stack: T1'Class) return T2;
> 
> But this is a hack. Can I define this function in the right way? (I want
> it to be dispatching only in T1, not T2.)

package Bad is

   type T1 is tagged null record;
   type T2 is tagged null record;

   not overriding function F (Stack: T1) return T2;
   
end Bad;

-- 
Victor Porton - http://portonvictor.org

  reply	other threads:[~2014-08-13 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 19:23 Trouble with "operation can be dispatching in only one type" Victor Porton
2014-08-13 19:44 ` Victor Porton [this message]
2014-08-13 20:01 ` Niklas Holsti
replies disabled

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