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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,23777acd564d513b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-16 23:01:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Grein, Christoph" Newsgroups: comp.lang.ada Subject: Re: Problem Eliminating constructors Date: Fri, 17 Jan 2003 07:54:32 +0100 (MET) Organization: ENST, France Message-ID: Reply-To: "Grein, Christoph" , "comp.lang.ada mail<->news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1042786904 55035 137.194.161.2 (17 Jan 2003 07:01:44 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 17 Jan 2003 07:01:44 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Authentication-Warning: mail.eurocopter.com: uucp set sender to using -f Content-MD5: BeUz7oTmEQwJEYs9SWdovA== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:33116 Date: 2003-01-17T07:54:32+01:00 > package A is > > type A_Type is tagged > record > X: Integer; > end; > package Avoid_Primitiveness is > function Create(X: Integer) return A_Type; -- guess what is the body end Avoid_Primitiveness; > > end A; > > Then I have > > type B_Type is new A.A_Type with > record > Y: Integer; > end; > > Compiler requires me to override Create as the return type changes. > But it is meaningless as now I need Create with two parameters > instead of one. > > What to do? > > Maybe there are a wau to make "function Create(X: Integer) return > A_Type" not a primitive operation so that compiler will not more > request to override it? > > Or maybe just move declaration of this func out of package A?