comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@classwide.com>
Subject: Re: New, and don't understand the error message!
Date: Thu, 16 May 2002 02:39:58 GMT
Date: 2002-05-16T02:39:58+00:00	[thread overview]
Message-ID: <2_EE8.14975$aV3.1936693419@newssvr11.news.prodigy.com> (raw)
In-Reply-To: d17ba8b2.0205151034.6f1d1961@posting.google.com

"Danny Woolston" <dannywooly@yahoo.co.uk> wrote in message
news:d17ba8b2.0205151034.6f1d1961@posting.google.com...
<snip>
> linked_lists_test.adb: Error: line 6 col 57 LRM:3.9.1(3), The
> accessibility level of a record extension shall not exceed that of its
> parent; this also applies in a generic instantiation
>        (In instance of generic Linked_Lists at linked_lists.ads: line 40 col
10)

In effect the compiler is telling you that a new type (ie, the "record
extension") derived from an existing tagged type (the "parent") cannot be
declared at a more deeply nested level than that of the "parent" type.  For
example, a tagged type declared in a library package can only have extensions
also declared at the library level.  ("Nesting" isn't quite the proper term for
"accessibility level", but it will be close enough to get the idea across.)

The gist of the rationale for the rule is that it precludes any attempt to
dispatch to routines that no longer exist.

Have a look at a good textbook; the error message above is exactly right in what
it is telling you, but the terms it uses are precise and must be understood in
order to know what to do.  (Reading the RM is probably not the best way to
start.)  It is a subtle topic and the textbook will/should explain it at
sufficient length.

---
Patrick Rogers                       Consulting and Training in:
http://www.classwide.com          Real-Time/OO Languages
progers@classwide.com               Hard Deadline Schedulability Analysis
(281)648-3165                                 Software Fault Tolerance







      parent reply	other threads:[~2002-05-16  2:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15 18:34 New, and don't understand the error message! Danny Woolston
2002-05-15 18:35 ` Florian Weimer
2002-05-16  1:58   ` Steve Doiel
2002-05-16  2:47     ` Pat Rogers
2002-05-16  2:31   ` Robert Dewar
2002-05-16  6:17     ` Florian Weimer
2002-05-16  6:21     ` Florian Weimer
2002-05-16  2:42   ` Pat Rogers
2002-05-16 10:58   ` John English
2002-05-16  2:39 ` Pat Rogers [this message]
replies disabled

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