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.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc203759328316c2,start X-Google-Attributes: gid103376,public From: dhunter@interserf.net (David Hunter) Subject: Question about tagged types and functions Date: 1996/05/21 Message-ID: <4ntg05$qgc@ns.interserf.net>#1/1 X-Deja-AN: 155997330 organization: Internet Services Of Fredericksburg content-type: Text/Plain; charset=US-ASCII mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-05-21T00:00:00+00:00 List-Id: Given: package Test is type BaseType is tagged record null; end BaseType; function Create return BaseType; type DerivedType is new BaseType with record null; end DerivedType; end Test; Why does Ada-95 (GNAT 3.01a) tell me that I also *must* have: function Create return DerivedType; There is something going on with tagged types and functions that I don't understand because if I use procedure Create(a : out BaseType); it (Ada-95) does not object. =============================================== David Hunter (hunter@mwc.edu) CPSC Department Mary Washington College Fredericksburg, VA 22401