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, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!fred From: fred@cs.utexas.edu (Fred Hosch) Newsgroups: comp.lang.ada Subject: Re: Limited types and generic parameters Message-ID: <4837@cs.utexas.edu> Date: 22 Feb 89 14:58:49 GMT References: <890222132712.21a009c0@elcc.epfl.ch> Organization: U. Texas CS Dept., Austin, Texas List-Id: Without careful scrutiny of the LRM (always a mistake), the only reasonable semantics seem to be the following. The generic "entity" is interpreted in its defining environment; thus, any free variables occuring in the generic are bound in the context of the generic definition. The generic instantiation "returns" an entity that is bound in the instantiating environment; any generic formals are bound to actuals interpreted in the instantiating environment. Thus in the example generic type T is limited private; package GP is type R is record F : T; end record; end GP; package P is new GP(T => INTEGER); P.R.F is of type INTEGER in the instantiating environment. (At least, that's my state-educated guess.) Fred Hosch fred@cs.utexas.edu