RFR: 8254105: allow static nested declarations [v4]

Vicente Romero vromero at openjdk.java.net
Tue Nov 3 17:20:58 UTC 2020


On Wed, 28 Oct 2020 18:00:18 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removing duplicated test
>
> The changes look good, but I have one concern: this patch seem to apply the improvements unconditionally, regardless of the source version - is this what we want? While I understand that the risk is low (this patch makes space of compilable programs bigger), at the same times it feels wrong that when compiling with `--source 14` I can now nest static classes inside member classes (which is not compatible with what the SE 14 spec says).

> As @mcimadamore, I think this should only be allowed for -source 16+, right?

I agree, I'm working on another iteration to fix the issue, thanks for the comments

-------------

PR: https://git.openjdk.java.net/jdk/pull/571


More information about the compiler-dev mailing list