[lworld] RFR: 8371356: [lworld] 'super' should be rejected in early construction context
Vicente Romero
vromero at openjdk.org
Mon Nov 17 19:38:16 UTC 2025
On Mon, 17 Nov 2025 19:16:43 GMT, Chen Liang <liach at openjdk.org> wrote:
>> in those cases javac already fails with:
>>
>> `error: not an enclosing class: ClassName`
>
> I remember the original case provided uses `Interface.super.staticField`. So it's like we have this code in `Medium` instead; can we maybe make `Inner9Test` instead of `Medium` implement `Parent`?
I couldn't reproduce the error with the original example in javac, the original example was tested on jshell, but when then the reporter went back to the original java code for which this issue was happening and the case in the JBS was the minimal standalone reproductor for the issue. Dunno what is the interaction with jshell that makes the difference though
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1740#discussion_r2535296142
More information about the valhalla-dev
mailing list