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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bdf542b1399c1cbe X-Google-Attributes: gid103376,public From: Bill Keen Subject: Re: Elaboration of nested packages. Date: 1997/06/22 Message-ID: #1/1 X-Deja-AN: 251670669 Distribution: world X-NNTP-Posting-Host: marnhull.demon.co.uk [158.152.152.171] References: Organization: Peninsula Products Newsgroups: comp.lang.ada Date: 1997-06-22T00:00:00+00:00 List-Id: In article , Robert Dewar writes >This is invalid code, since the instantiation appears before the body of >the generic. It should raise Program_Error, Thanks, both repsonses have confirmed my understanding. It is just that the two compilers at work both let this through, Alsys 4.2 and Green Hills 1.8.7 (I think) and when I brought it home and run it through GNAT I started to doubt my grasp of the issue. It seems that many compilers are lax in this area. The odd thing is, if you declare the generic at the outer level the Alsys compiler spots the problem right away. ... generic package IG is end IG; package PI is new OP.IG; -- Is this ok? package body IG is begin end; ... Hide it in one layer of package and it can't see the problem. -- Bill Keen