comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Generics with concrete and class-wide types
Date: Mon, 31 Mar 2008 19:23:03 -0500
Date: 2008-03-31T19:23:03-05:00	[thread overview]
Message-ID: <fsrv9c$r7f$1@jacob-sparre.dk> (raw)
In-Reply-To: 279b6f4f-36cf-446f-8b54-fd72b957b22f@i7g2000prf.googlegroups.com

"Maciej Sobczak" <see.my.homepage@gmail.com> wrote in message
news:279b6f4f-36cf-446f-8b54-fd72b957b22f@i7g2000prf.googlegroups.com...
> Consider a generic subprogram that makes sense for arguments of both
> class-wide type and a concrete type.
...
> The problem is that I failed to instantiate Some_Procedure for
> Iterator_Integer.Iterator'Class, which I could then reuse for
> My_Concrete_Iterator as well as for My_Other_Concrete_Iterator and so
> on:
>
> -- does not compile:
> procedure SP is new Some_Procedure
>   (T => Integer, Iterator_Type => Iterator_Integer'Class); -- Bang!
>
> Bang, because relevant iterator operations cannot be found - the ones
> that are found have *wrong signatures*.

Right. This seems related to the problem mentioned in AI05-0071-1. (That AI
is still under construction, but it also is about operations having the
wrong signatures.) Since I'm not sure how that AI is going to be fixed, it's
not clear to me if it will cover this case or not. But perhaps you should
submit a question to Ada Comment so that it gets considered as well.

                                      Randy.





  parent reply	other threads:[~2008-04-01  0:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 20:22 Generics with concrete and class-wide types Maciej Sobczak
2008-03-31 23:38 ` Adam Beneschan
2008-04-01 20:10   ` Randy Brukardt
2008-04-01 21:17     ` Adam Beneschan
2008-04-01  0:23 ` Randy Brukardt [this message]
2008-04-01  3:57   ` Eric Hughes
2008-04-01  6:58     ` christoph.grein
2008-04-01  7:22 ` Georg Bauhaus
2008-04-01  9:42 ` Dmitry A. Kazakov
2008-04-01  9:51   ` Maciej Sobczak
2008-04-01 10:53     ` Dmitry A. Kazakov
replies disabled

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