[lworld] RFR: 8367323: [lworld] javac is rejecting valid code after fix for JDK-8359370 [v2]
Vicente Romero
vromero at openjdk.org
Fri Sep 12 16:56:36 UTC 2025
> 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`
Vicente Romero has updated the pull request incrementally with two additional commits since the last revision:
- Merge branch 'JDK-8367323' of https://github.com/vicente-romero-oracle/valhalla into JDK-8367323
- addressing review comments
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/1567/files
- new: https://git.openjdk.org/valhalla/pull/1567/files/beff0210..33a050b9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=1567&range=01
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1567&range=00-01
Stats: 9 lines in 1 file changed: 7 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/valhalla/pull/1567.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1567/head:pull/1567
PR: https://git.openjdk.org/valhalla/pull/1567
More information about the valhalla-dev
mailing list