On Thu, 11 Sep 2025 02:14:37 GMT, Vicente Romero <[email protected]> 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` This pull request has now been integrated. Changeset: 04efe5c6 Author: Vicente Romero <[email protected]> URL: https://git.openjdk.org/valhalla/commit/04efe5c66b70b9dca1a5c538c9a04e7ad93c107a Stats: 96 lines in 4 files changed: 52 ins; 23 del; 21 mod 8367323: [lworld] javac is rejecting valid code after fix for JDK-8359370 Reviewed-by: liach, mcimadamore ------------- PR: https://git.openjdk.org/valhalla/pull/1567
