[jdk23] RFR: 8334751: revert fix for JDK-8334488 which introduced a regression

Vicente Romero vromero at openjdk.org
Fri Jun 21 21:42:26 UTC 2024


Fix for [JDK-8334488](https://bugs.openjdk.org/browse/JDK-8334488) which was backported from JDK 24 introduced a regression in javac. We propose to revert it. Basically code like:

class Test {
    Test() {}

    Test(int a) {
        class InnerLocal {}
        new InnerLocal() {}; //compilation fails here
        this();
    }
}

should be accepted and it is being rejected after the mentioned backport.

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

Commit messages:
 - 8334751: revert fix for JDK-8334488 which introduced a regression

Changes: https://git.openjdk.org/jdk/pull/19838/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19838&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8334751
  Stats: 26 lines in 7 files changed: 1 ins; 21 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/19838.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19838/head:pull/19838

PR: https://git.openjdk.org/jdk/pull/19838


More information about the compiler-dev mailing list