RFR: 8256411: Based anonymous classes have a weird end position
Vicente Romero
vromero at openjdk.java.net
Mon Dec 7 19:26:13 UTC 2020
On Mon, 16 Nov 2020 18:12:35 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Consider code like this:
>
> package t;
> class Test {
> class I {}
> static Object S = new Test().new I() {};
> }
>
> There is a synthetically generated `Test.I` in the extends clause of the anonymous class. The current end position for it is the end of the whole anonymous class (i.e. at '}'), which does not make much sense. The proposal is that the end position should be the end position of the "I" identifier, which is the same as if the anonymous class would not be based on an enclosing instance.
looks good
-------------
Marked as reviewed by vromero (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1232
More information about the compiler-dev
mailing list