RFR: 8325257: jshell reports NoSuchFieldError with instanceof primitive type
Aggelos Biboudis
abimpoudis at openjdk.org
Tue Feb 6 10:54:16 UTC 2024
Fixed compiler bug during lowering of the type test, where the let expression was using the `expr` of the old `tree` and not of the translated one. The latter manifested as a JShell error. Added compiler test as well. e.g.,
class $JShell$2 {
$JShell$2() {
super();
}
public static boolean $1;
public static Object do_it$() throws Throwable {
return Boolean.valueOf($1 = (let /*synthetic*/ final Object tmp184$ = $JShell$1.o
in tmp184$ != null && o instanceof Long));
// ^
}
}
-------------
Commit messages:
- 8325257: jshell reports NoSuchFieldError with instanceof primitive type
Changes: https://git.openjdk.org/jdk/pull/17729/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17729&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8325257
Stats: 22 lines in 3 files changed: 17 ins; 0 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/17729.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17729/head:pull/17729
PR: https://git.openjdk.org/jdk/pull/17729
More information about the compiler-dev
mailing list