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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ca6fa73fc39d4c65,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!e8g2000vbz.googlegroups.com!not-for-mail From: Julian Leyh Newsgroups: comp.lang.ada Subject: Text_IO.Text_Streams causing errors Date: Fri, 25 Feb 2011 07:14:33 -0800 (PST) Organization: http://groups.google.com Message-ID: <17ddc153-6fd1-4fcb-b582-d93badeb22dd@e8g2000vbz.googlegroups.com> NNTP-Posting-Host: 194.156.172.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1298646873 26112 127.0.0.1 (25 Feb 2011 15:14:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 25 Feb 2011 15:14:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e8g2000vbz.googlegroups.com; posting-host=194.156.172.86; posting-account=4IMjSwoAAABghF4GBOy5ozdaZM8EkGwR User-Agent: G2/1.0 X-HTTP-Via: 1.0 localhost (squid/3.1.3) X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:18567 Date: 2011-02-25T07:14:33-08:00 List-Id: Hi, i have some code that looks like this (stripped to minimal example): -- bar.adb: with Foo; procedure Bar is Foobar : aliased Foo.Foobar; begin Foo.Print (Foobar'Access, "Foobar"); end Bar; -- foo.adb: with Text_IO.Text_Streams; package body Foo is procedure Print (This : access Foobar'Class; Prefix : in String) is begin Text_IO.Put_Line (Prefix); end Print; end Foo; -- foo.ads: package Foo is type Foobar is tagged private; procedure Print (This : access Foobar'Class; Prefix : in String); private type Foobar is tagged null record; end Foo; Compiling it, I get this error: foo.adb:3:14: not fully conformant with declaration at foo.ads:3 foo.adb:3:14: type of "This" does not match If I add -gnat05, the error disappears, and it disappears, too, if I add the "Ada." prefix to the "with". I know that I could remove the "Text_Streams", because it is not used at all, but I'm still a big confused about this error. Is it a compiler bug or did I do something forbidden? Tried with compilers GNAT GPL 2010 and GNAT Pro 6.3.1