This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: Fix for PR 4695
Dictated by the spec:
JLS 8.1.2:
An inner class is a nested class that is not explicitly or implicitly
declared static.
...
Inner classes include local (§14.3), anonymous (§15.9.5) and non-static
member classes (§8.5).
JLS 14.3:
All local classes are inner classes (§8.1.2).
JLS 15.9.5:
An anonymous class is always an inner class (§8.1.2); it is never static
(§8.1.1, §8.5.2).
Bryce McKinlay wrote:
>
> Eric Blake wrote:
>
> >This observation is correct, even though jikes 1.15 does not implement
> >it correctly! Note that there is a difference between a true static
> >class (ACC_STATIC bit set) and a local or anonymous class in a static
> >context.
> >
>
> Do you happen to know if this is actually dictated by the spec, or if it
> is just nice to have in order to be exactly the same as javac?
>
> regards
>
> Bryce.
--
This signature intentionally left boring.
Eric Blake ebb9@email.byu.edu
BYU student, free software programmer