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,3ac1d8bc704e79f7,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-06 06:04:51 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) Newsgroups: comp.lang.ada Subject: Dispatching problem. Date: 6 Feb 2003 06:04:51 -0800 Organization: http://groups.google.com/ Message-ID: NNTP-Posting-Host: 138.14.239.132 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1044540291 27104 127.0.0.1 (6 Feb 2003 14:04:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 6 Feb 2003 14:04:51 GMT Xref: archiver1.google.com comp.lang.ada:33835 Date: 2003-02-06T14:04:51+00:00 List-Id: We have the following: package A is type Msg; type Msg_Ptr is access all Msg'Class; type Msg is abstract tagged null record; ... other declarations type M1 is new Msg with .... type M1_Ptr is access all M1; type M2 is new Msg with .... type M2_Ptr is access all M2; ... other declarations function X (Param : Integer) return Msg_Ptr; end A; with A; package B is type Msg is abstract new A.Msg with null record; type Msg_Ptr is access all Msg; type B1 is new A.M1 with null record; type B1_Ptr is access all B1; type B2 is new A.M1 with null record; type B2_Ptr is access all B2; procedure Y (MP : access B1); procedure Y (MP : access B2); end B; with A; with B; procedure Main is X : A.Msg_Ptr; Y : A.Msg_Ptr; begin X := A.X (1); -- Building a A.M1 Y := A.X (2); -- Building a A.M2 B.Y (B.Msg_Ptr (X)); -- causes Constraint_Error Tag Check Failed to be raised. end Main; How can we dispatch in package B?