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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,a9a99a861147e2f8,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-19 14:43:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!isdnethub!foorum!not-for-mail From: alex Newsgroups: comp.lang.ada Subject: access on function returning a class wide type Date: 19 Nov 2002 21:38:32 GMT Organization: perso Message-ID: <20021119-223832-295143@foorum.com> NNTP-Posting-Host: 213.44.12.241 NNTP-Posting-Date: 19 Nov 2002 21:38:32 GMT X-Complaints-To: abuse@foorum.fr X-POSTER: foorum.com X-Foorum_user_id: X-Foorum_user_tmp_id: 20021119-223333-705548-213.44.12.241-club-internet X-Originating-User: 213.44.12.241 X-Newsreader: Foorum Xref: archiver1.google.com comp.lang.ada:31118 Date: 2002-11-19T21:38:32+00:00 List-Id: Is there a �workaround/trick� to implement this kind of think. package A is type A_T is abstract tagged null record; function Fa return A_T is abstract; type Fa_Ptr is access function return A_T'Class; end A; with A; package B is type B_T is new A.A_T with null record ; function Fa return B_T; end B; package body B is function Fa return B_T is begin return (A.A_T with null record); end Fa; end B; with A,B; procedure Test is Ptr : A.Fa_Ptr := B.Fa'access; -- error : LRM:8.6(28) begin null; end Test; The compiler is expecting a function returning a A_T�Class, ok I understand� But, B_T is in the A_T�Class! -- Ce message a ete poste via la plateforme Web club-Internet.fr This message has been posted by the Web platform club-Internet.fr http://forums.club-internet.fr/