spec clarification: type annotations on static nested types

Liam Miller-Cushon cushon at google.com
Thu Feb 22 19:23:43 UTC 2018

On Wed, Feb 21, 2018 at 2:43 PM, Alex Buckley <alex.buckley at oracle.com>

> On 2/21/2018 2:34 PM, Liam Miller-Cushon wrote:
>> I'm now reading "nested type" as meaning a type that is nested inside an
>> *annotatable* type.
>> i.e. in A.B where B is a non-static inner class, A is an annotatable
>> enclosing instance type, so a type path is needed to indicate that in
>> `A. at Foo B` the annotation is on B.
>> However in A.B where B is a static member class, A is a 'scoping
>> construct' rather than an annotatable type, so no type path is needed
>> for `A. at Foo B` since B is the only annotatable type.
> That sounds plausible -- the "scoping construct" concept tunneled itself
> fairly deeply into the JLS -- but I don't especially recall that "nested
> type" in JVMS meant to represent only non-static members. I can
> only suggest more digging on type-annotations-spec-experts, sorry.

I understand that to have been the intent of at least one member of the EG,
and will try to get additional clarification on this point. I didn't find
anything conclusive in type-annotations-spec-experts.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180222/063bd5f2/attachment.html>

More information about the compiler-dev mailing list