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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31178c24bcde806e,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-12 20:48:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!diablo.theplanet.net!zen.net.uk!news.cabal.org.uk!news-peer.gradwell.net!not-for-mail Newsgroups: comp.lang.ada From: porton@ex-code.com (Victor Porton) Date: Mon, 13 Jan 2003 06:11:23 +0500 Organization: Extreme Code Software (http://ex-code.com) Subject: Finalization of tagged types - problem Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Content-Type: text/plain; charset=us-ascii X-URL: http://www.ex-code.com/ Message-ID: <3e224506$0$33924$bed64819@news.gradwell.net> NNTP-Posting-Date: 13 Jan 2003 04:48:06 GMT NNTP-Posting-Host: 195.149.39.13 X-Trace: 1042433286 news.gradwell.net 33924 mail2news/195.149.39.13 X-Complaints-To: news-abuse@gradwell.net Xref: archiver1.google.com comp.lang.ada:32950 Date: 2003-01-13T04:48:06+00:00 List-Id: I have a non-limited tagged type (not derived from Ada.Finalization.Controlled) Base. I derive: type State_Type is new Base with record -- ... Finalizer: Finalizer_Type(State_Type'Access); end record; I want to add a component with back-reference derived from Ada.Finalization.Controlled or Ada.Finalization.Limited_Controlled for auto-finalization of State_Type. But type Finalizer_Type(State: access State_Type) is new Ada.Finalization.Controlled with null record; Compiler: "Access discriminant are allowed only for limited types". Can be done something among the obvious but imperfect solutions: 1. make Base controlled. 2. make Base limited and derive Finalizer_Type from Limited_Controlled instead?