RFR: 8254105: allow static nested declarations [v4]
vromero at openjdk.java.net
Mon Nov 2 21:00: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?
right but the new goodies are only available if records are allowed. The code is behind `allowRecords` which should only be true for source >= 16, shouldn't that be enough?
More information about the compiler-dev