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 Lines: 31 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