Integrated: 8256411: Based anonymous classes have a weird end position
Jan Lahoda
jlahoda at openjdk.java.net
Tue Dec 8 08:41:12 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.
This pull request has now been integrated.
Changeset: 51ac3768
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/51ac3768
Stats: 39 lines in 3 files changed: 35 ins; 0 del; 4 mod
8256411: Based anonymous classes have a weird end position
Reviewed-by: vromero
-------------
PR: https://git.openjdk.java.net/jdk/pull/1232
More information about the compiler-dev
mailing list