On Fri, 12 Sep 2025 17:44:22 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` > > Vicente Romero has updated the pull request incrementally with two additional > commits since the last revision: > > - fixing comment > - addressing review comments src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1405: > 1403: } > 1404: tree = TreeInfo.skipParens(tree); > 1405: if (sym != null) { I just removed this `if` as the symbol can't be null now, but it has provoked a big diff, mostly an indentation change ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1567#discussion_r2345028251
