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,cfe54a7562aab2a1 X-Google-Attributes: gid103376,public From: ncohen@watson.ibm.com (Norman H. Cohen) Subject: Re: Factory Pattern in Ada Date: 1996/08/25 Message-ID: <4vq8so$10a6@watnews1.watson.ibm.com>#1/1 X-Deja-AN: 176411429 distribution: world references: <321E17F6.167E@velveeta.apdev.cs.mci.com> organization: IBM T.J. Watson Research Center reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada Date: 1996-08-25T00:00:00+00:00 List-Id: In article <321E17F6.167E@velveeta.apdev.cs.mci.com>, James_Rogers writes: |> Since Binary_Node is a descendant of Node, why does the compiler |> complain about the assignment of a value of Binar_Node_Access to |> a type of Node_Access (as defined above)? Conversion from access-to-derived-type to access-to-parent-type is allowed, but only if the access-to-parent type is a general ("access all") access type. Even then, the conversion must be written as an explicit type conversion. -- Norman H. Cohen ncohen@watson.ibm.com