From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8385fc6e4bf20336 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Generics with concrete and class-wide types Date: Mon, 31 Mar 2008 19:23:03 -0500 Organization: Jacob's private Usenet server Message-ID: References: <279b6f4f-36cf-446f-8b54-fd72b957b22f@i7g2000prf.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1207009389 27887 69.95.181.76 (1 Apr 2008 00:23:09 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 1 Apr 2008 00:23:09 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:20695 Date: 2008-03-31T19:23:03-05:00 List-Id: "Maciej Sobczak" 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.