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/14 Message-ID: <33293975.41C6@Rational.COM>#1/1 X-Deja-AN: 225439141 References: <5g3s2l$174@sutton.cs.columbia.edu> To: "Alexander V. Konstantinou" Organization: Rational Software Corporation in (the) SQY, France Newsgroups: comp.lang.ada Date: 1997-03-14T00:00:00+00:00 List-Id: Alexander, There's a bug in GNAT, but it is not where you think. The program you propose should write: Main Begin ---- F1 := F2 B1 := B2 Main End ---- And that's all! Why? You declared: > package Foo_Controlled is > > type Foo is private; > procedure Initialize(F: in out Foo); > procedure Adjust(F: in out Foo); > procedure Finalize(F: in out Foo); > > private [...] > end Foo_Controlled; and same kind of declaration for Bar. At the place you declare Initialize, Adjust and Finalize, you are in the partial view of the type. You simply declare subprograms, that have nothing to do with the inherited subprograms from Controlled, because at the place you declare them, the type is not known as inheriting from Controlled. Put Initialize, Adjust and Finalize in the full view (i.e. at the end of the private part in your example) and it will work. Regards, Jerome. PS: tested with Apex 2.2.2B. ______________________________________________________________________ Jerome Desquilbet jDesquilbet@Rational.COM ' ^