RFR: 8325257: jshell reports NoSuchFieldError with instanceof primitive type

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Feb 6 13:56:54 UTC 2024


On Tue, 6 Feb 2024 10:50:08 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

> 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));                          
>                                                         // ^
>     }
> }

Looks good

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

Marked as reviewed by mcimadamore (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17729#pullrequestreview-1865254355


More information about the compiler-dev mailing list