From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Child packages named Ada illegal?
Date: Wed, 31 Oct 2012 10:02:44 -0700 (PDT)
Date: 2012-10-31T10:02:44-07:00 [thread overview]
Message-ID: <f45099ec-4253-4fdc-be7a-773270f70da2@googlegroups.com> (raw)
In-Reply-To: <c3f831f0-a622-4f20-9d9d-db035651758b@googlegroups.com>
It's probably an issue of visibility. Consider:
with Ada.Calendar.Time;
Procedure Test is
package Ada is
end Ada;
Now : Constant Ada.Calendar.Time:= Ada.Calendar.Clock;
Begin
null;
End Test;
In this case the Now declaration is prevented from being valid because the type, Time, resides in the package Calendar which is a child of Ada... but Ada at that point refers to Test.Ada which has no Calendar child package.
That te following compiles indicates Ada is not reserved:
Procedure Test is
Now : Constant Ada.Calendar.Time:= Ada.Calendar.Clock;
Begin
declare
package Ada is
end Ada;
begin
null;
end;
End Test;
next prev parent reply other threads:[~2012-10-31 17:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 16:47 Child packages named Ada illegal? Marius Amado-Alves
2012-10-31 17:02 ` Shark8 [this message]
2012-10-31 17:20 ` Adam Beneschan
2012-10-31 17:59 ` Marius Amado-Alves
2012-10-31 18:16 ` Adam Beneschan
2012-10-31 18:41 ` Marius Amado-Alves
2012-10-31 19:39 ` Shark8
2012-11-01 9:27 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox