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,3c256edee673e6,start X-Google-Attributes: gid103376,public From: bourguet@my-dejanews.com Subject: Problem with controlled types Date: 1998/12/14 Message-ID: <753cnv$3sq$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 422135870 X-Http-Proxy: 1.0 x15.dejanews.com:80 (Squid/1.1.22) for client 158.140.208.29 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Mon Dec 14 16:01:04 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) Date: 1998-12-14T00:00:00+00:00 List-Id: I've found a CD with Aonix ObjectAda 7.1 Special Edition and tried to compile a program developped under gnat 3.10. I failed due to the number of units limitation of the Special Edition :-( but in the process I found and removed some gnat dependancies. There where place I had put these dependancies knowingly (like using the os_lib package, I understand Ada stream better now). But the following one is, IMHO, the result of bugs in one of the compilers, probably gnat but I prefer to ask here before report the problem. with ada.finalization; package Pkg is type A is private; -- operations on B type B is private; function Get_B (I: A) return B; -- other operations on B private type A is new Ada.Finalization.Controlled with record ... end record; type B is new Ada.Finalization.Controlled with record ... end record; end pkg; ObjectAda complain that the Get_B function is primitive on two tagged types, and that is not allowed. Gnat compile and run correctly (as A'Class contains only A and B'Class only B, this is not strange). Now, which one is correct? -- Jean-Marc -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own