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,12301f67e4ba5adf X-Google-Attributes: gid103376,public From: Jerome Desquilbet Subject: Re: Controlled Types & GNAT 3.09 Date: 1997/03/21 Message-ID: <3332AD5C.41C6@Rational.COM>#1/1 X-Deja-AN: 227294929 References: <5g3s2l$174@sutton.cs.columbia.edu> <3329762C.7AC3@cs.uah.edu> <5gfqro$jru@sutton.cs.columbia.edu> Organization: Rational Software Corporation in (the) SQY, France Newsgroups: comp.lang.ada Date: 1997-03-21T00:00:00+00:00 List-Id: Alexander V. Konstantinou wrote: > > I am forwarding a message sent to me by the GNAT developers. It > appears > that the GNAT language lawyers believe that the use of Controlled > types > in my example is a valid one. I still think that your example shouldn't produce this output. The bug in GNAT has been fixed the wrong way: if Initialize, Adjust and Finalize are declared in the partial view (where the type is not known as being Controlled), then the Initialize, Adjust and Finalize you declare are not the related to the operation with same name in the Controlled type. This is true for any tagged type construction like yours: For example: package Base is type Object is tagged null record; procedure Primitive (A_Base : in Object); end Base; with Base; package Derived is type Object is private; procedure Primitive (A_Derived : in Object); private type Object is new Base.Object with null record; end Derived; Users of Derived DON'T KNOW that Derived.Object is derived from Base.Object, right Does GNAT compiles the following with Derived declared as above??? with Base; with Derived; procedure Try_Base_And_Derived is A_Derived : Derived.Object; begin Base.Primitive (Base.Object'Class (A_Derived)); end Try_Base_And_Derived; I hope the answer is no... Why would it be different because you derived from Controlled instead of some other tagged type??? Jerome. ______________________________________________________________________ Jerome Desquilbet jDesquilbet@Rational.COM ' ^