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,104df2b9b7a2f689 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: adam@irvine.com Newsgroups: comp.lang.ada Subject: Re: Interfaces Date: 18 May 2005 09:57:03 -0700 Organization: http://groups.google.com Message-ID: <1116435423.795160.149540@g44g2000cwa.googlegroups.com> References: <8764xj9wzf.fsf@deneb.enyo.de> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1116435432 6455 127.0.0.1 (18 May 2005 16:57:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 18 May 2005 16:57:12 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news1.google.com comp.lang.ada:11080 Date: 2005-05-18T09:57:03-07:00 List-Id: Florian Weimer wrote: > Suppose there are two interface types, J1 and J2, and the following > dispatching subprogramms: > > procedure Foo (Obj : J1); > procedure Foo (Obj : J2; > > T implements both J1 and J2, and provides a body for > > procedure Foo (Obj : T); > > As far as I understand the Ada 200x spec, this subprogram declaration > overrides both versions of Foo, such that > > Foo ((J1 (T_Obj)); > Foo ((J2 (T_Obj)); > > invoke the same subprogram. Is this correct? Unless I've missed something, the above two statements aren't dispatching calls, so I don't think the overriding subprogram provided for T would be called. Maybe this is more in line with what you're thinking of? Foo ((J1'Class (T_Obj)); Foo ((J2'Class (T_Obj)); -- Adam