From: Julian Leyh <julian@vgai.de>
Subject: Text_IO.Text_Streams causing errors
Date: Fri, 25 Feb 2011 07:14:33 -0800 (PST)
Date: 2011-02-25T07:14:33-08:00 [thread overview]
Message-ID: <17ddc153-6fd1-4fcb-b582-d93badeb22dd@e8g2000vbz.googlegroups.com> (raw)
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
next reply other threads:[~2011-02-25 15:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 15:14 Julian Leyh [this message]
2011-02-25 17:34 ` Text_IO.Text_Streams causing errors Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox