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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4ed596f1f077b44e,start X-Google-Attributes: gid103376,public From: Vance Christiaanse Subject: Primitive Operations Question Date: 1996/07/30 Message-ID: <31FE812C.7B3D@ix.netcom.com>#1/1 X-Deja-AN: 171112098 content-type: text/plain; charset=us-ascii organization: Cintech Consulting x-netcom-date: Tue Jul 30 6:39:28 PM PDT 1996 mime-version: 1.0 reply-to: cintech@ix.netcom.com newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; PPC) Date: 1996-07-30T18:39:28-07:00 List-Id: Hello! Much to my dismay, the following procedure compiles on the WebAda (GNAT 3.04) compiler. By my reading of RM95 3.2.3, A and B don't fit any part of the definition of primitive operations, so I don't see why iheritance seems to be occurring. When I replace all three types with a hierarchy of tagged types, both calls fail to compile, as I would have expected. Any insight would be much appreciated. Thanks, Vance Christiaanse Cintech Consulting cintech@ix.netcom.com procedure Example is type My_Digit is range 0..7; procedure A (V : My_Digit); type New_Digit is new My_Digit; -- is A inherited??? procedure B (W : New_Digit); N : New_Digit := 1; type Newer_Digit is new New_Digit; -- is B inherited??? M : Newer_Digit := 1; procedure A (V : My_Digit) is begin null; end A; procedure B (W : New_Digit) is begin null; end B; begin A(N); B(M); end Example;