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,a1a7a64f0d47e271 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: [Q]: Generic subprogram instantiation Date: 1996/07/06 Message-ID: #1/1 X-Deja-AN: 167162731 references: organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-07-06T00:00:00+00:00 List-Id: Michael wrote " procedure sub_main is new sub_main(galois);" GNAT is right to flag that, it is clearly illegal, since sub_main on the right would refer to sub_main on the left if it was allowed to (which it is not), and not to the outside sub_main. In fact the rule is that sub_main is introduced by the declaration, but cannot be refrerenced until the declaration is complete. To rewrite this correctly, use appropriate qualiffication for the sub_main reference on the right hand side to get the one you want!