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: a07f3367d7,df055ffdd469757d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.89.133 with SMTP id bo5mr2385214wib.6.1361849334816; Mon, 25 Feb 2013 19:28:54 -0800 (PST) Path: bp2ni59445wib.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!216.196.110.144.MISMATCH!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!news.teledata-fn.de!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Class wide preconditions: error in GNAT implementation? Date: Mon, 18 Feb 2013 17:49:58 +0000 Organization: A noiseless patient Spider Message-ID: References: <76e9fde1-3cbb-47e0-b578-b7b9be3ff9c6@googlegroups.com> Mime-Version: 1.0 Injection-Info: mx05.eternal-september.org; posting-host="4b4553eac4247089c1d7c0bcc27eb5e3"; logging-data="19423"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ec2889Y9VDG83e9C+Lga1yVoHx2gJG4I=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:qzvFEbWlASf5dmgPXgm2erqToSI= sha1:ILOcfnR7y7eOqbVY/aR+n0hEUuI= Content-Type: text/plain Date: 2013-02-18T17:49:58+00:00 List-Id: ytomino writes: > I am not aware of the intention of the writer of AARM (Randy?). > Though as far as I read AARM and compare it with the Eiffel book, > >> O := new B_Pack.T; >> Put_Line ("passing 0 to an actual B_Pack.T"); >> O.P (0); > > Calling B_Pack.P via access A_Pack.T'Class should be failure. > > 6.6.1.38.a/3: > >> Pre'Class(es) that apply to the subprogram that the dispatching call >> is resolving to, not the Pre'Class(es) for the subprogram that is >> ultimately dispatched to. > > "resolving to" = A_Pack.P > "dispatched to" = B_Pack.P Exactly so; both calls should have failed.