Package name semantics
Alex Buckley
alex.buckley at oracle.com
Tue May 23 20:12:26 UTC 2017
On 5/23/2017 1:04 PM, Stephan Herrmann wrote:
> The 2017-05-18 update of JLS 6.5.3.2 introduces the concept of
> unique visibility, but still has this unchanged sentence:
>
> "The package name Q.Id names a package that is the member named Id
> within the package named by Q."
>
> If "the" in "the member named Id" is to be taken literally, then
> the specification still doesn't work, as I may elaborate if needed.
> But I assume, dropping "the" in favor of "a" or a similar change
> easily fixes this to reflect the intention, right?
The full text is:
-----
If a package name is of the form Q.Id, then Q must also be a package
name. The package name Q.Id names a package that is the member named Id
within the package named by Q.
[DELETED]If Q does not name an observable package (§7.4.3), or Id is not
the simple name of an observable subpackage of that package, then a
compile-time error occurs.[/DELETED]
[ADDED]If Q.Id does not name a package that is uniquely visible to the
current module (§7.4.3), then a compile-time error occurs.[/ADDED]
-----
The editorial style of this section has historically been rather odd,
because the first paragraph makes assertions that are true only if the
second paragraph's compile-time error doesn't occur. I have continued
with that style in JLS9: the first paragraph can say "_the_ member named
Id" because the second paragraph assures a unique Q.Id.
Alex
More information about the jigsaw-dev
mailing list