comp.lang.ada
 help / color / mirror / Atom feed
From: Phil Thornley <phil.jpthornley@gmail.com>
Subject: Re: Q: SPARK: visibility of private child in parent's body
Date: Sun, 25 Aug 2013 20:35:59 +0100
Date: 2013-08-25T20:35:59+01:00	[thread overview]
Message-ID: <MPG.2c846cf769987f509896a8@news.zen.co.uk> (raw)
In-Reply-To: 521a0149$0$9514$9b4e6d93@newsspool1.arcor-online.net

In article <521a0149$0$9514$9b4e6d93@newsspool1.arcor-online.net>, 
rm.dash-bauhaus@futureapps.de says...
> 
> Hi,
> 
> a small hierarchy of packages has the body of parent P refer
> to entities of a private child package P.C.  According to
> Barnes (1997), this is possible. (I have placed supporting
> quotes before the body of P below.)
> 
> I'm hitting a wall.
> 
> Examiner does not accept the packages, warning that C of P.C
> is "either undeclared or not visible at this point".
> (There is no --# inherit for P.C, as none is required.)
> The Examiner then continues diagnosing semantic errors.
> 
> When I rearrange the source by embedding package P.C into the
> body of P instead of making it a private child package, then
> everything seems fine.
> 
> What am I doing wrong?
> 
> Can I at all refer to private packages in the parent's body
> when using somewhat recent editions of SPARK (2011 and 2012)?
> 
> 

This code works OK for me (with the "P." prefixes removed from within 
the body of P) with both the last standalone SPARK (2012) and the HiLite 
version (downloaded 2013-06-07).

Assuming you are using separate files for each unit, the next place I 
would look would be the index file. Does this identify the files that 
you think it does, and does it contain the private child announcement 
for P.C:
   P components are P.C

Cheers,

Phil



  reply	other threads:[~2013-08-25 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25 13:06 Q: SPARK: visibility of private child in parent's body Georg Bauhaus
2013-08-25 19:35 ` Phil Thornley [this message]
2013-08-25 22:00   ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox