[lworld] RFR: 8367323: [lworld] javac is rejecting valid code after fix for JDK-8359370
Chen Liang
liach at openjdk.org
Fri Sep 12 15:29:44 UTC 2025
On Thu, 11 Sep 2025 02:14:37 GMT, Vicente Romero <vromero at openjdk.org> wrote:
> Recent fix for [JDK-8359370](https://bugs.openjdk.org/browse/JDK-8359370) introduced a minor bug. This code should be accepted by javac:
>
> class SuperClass<T> {
> public SuperClass(Object o) {}
> }
>
> class Sub<T> extends SuperClass<T> {
> public Sub() {
> super(new Object() {
> void foo() {
> getClass();
> }
> });
> }
> }
>
>
> but it is currently rejected as the `getClass` invocation is considered to be an invocation of an instance method of class `Sub`
Seems the bot fixes itself. Now we are ready to merge this fix.
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1567#issuecomment-3285725329
More information about the valhalla-dev
mailing list