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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4cd601a04ec3f19e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: formal package question Date: Mon, 14 Feb 2011 06:51:40 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: anon@anon.org NNTP-Posting-Host: E6YnUs5zFBfQZZA4n2g/Iw.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news1.google.com comp.lang.ada:17275 Date: 2011-02-14T06:51:40+00:00 List-Id: Typo: package F2 is new F (Character, P); -- P => P In , ytomino writes: >Hello, >Please look this code: > >-------- >package formalpkg is > > generic > type T is private; > with procedure P (X : T) is <>; > package F is > end F; > > generic > with package FA is new F (others => <>); > package B is > end B; > > procedure P1 (X : Character) is null; > package F1 is new F (Character, P1); -- use P => P1 > > package B1 is new B (F1); -- Error !! > > procedure P (X : Character) is null; > package F2 is new F (Character); -- P => P > > package B2 is new B (F2); -- OK > >end formalpkg; >-------- >% gnatmake formalpkg.ads >gcc -c formalpkg.ads >formalpkg.ads:17:25: actual for "P" in actual instance does not match >formal >gnatmake: "formalpkg.ads" compilation error >-------- > >B1 was compile error, but B2 is ok. Why? >Where is wrong in my code? >I want to use instances of generic package with some different >subprograms like B1... > >(I use gcc-4.5.1)