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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!ucbvax!DCA-EMS.ARPA!jmoody From: jmoody@DCA-EMS.ARPA (Jim Moody, DCA C342) Newsgroups: comp.lang.ada Subject: Sam Harbaugh's generic string package Message-ID: <8711301908.AA18332@ajpo.sei.cmu.edu> Date: Mon, 30-Nov-87 13:52:05 EST Article-I.D.: ajpo.8711301908.AA18332 Posted: Mon Nov 30 13:52:05 1987 Date-Received: Fri, 4-Dec-87 06:53:42 EST Sender: usenet@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: Let me suggest an hypothesis. Ada/Ed has got the right line for the error, but the wrong part of the LRM. 7.4.1(4) imposes restrictions on the use of a nmae of a private type prior to the full declaration. It is possible that the implementations which reject Sam's package do so thinking it violates 7.4.1(4), since to resolve the ambiguity of which "=" is meant requires that the compiler implicitly use the name of the private type in an illegal manner (?!). The nice thing about this hypothesis is that it's testable. If in the nested generic, the function declaration is truncated to a function specification, and the actual renaming postponed to the package body (inside the package body), the putative violation of 7.4.1(4) would disappear and the thing should compile. Since I don't have one of the compilers which rejected the package, I can't perform the experiment. Would someone like to try? WWhether such code does violate 7.4.1(4) is a nice question. It violates tion. My best answer is that it vioates the spirit but not the letter. Can someone come up with a better resolution. Jim.