RFR: 8254286: Wrong inference in switch expression with "null" arm
    Vicente Romero 
    vromero at openjdk.java.net
       
    Mon Oct 12 13:46:21 UTC 2020
    
    
  
On Fri, 9 Oct 2020 17:08:36 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Basically, for code like:
> 
>         var t1 = switch (s) {
>             case 1 -> i1;
>             case 2 -> null;
>             default -> i2;
>         };
> 
> Attr.condType is currently passing <type-of-i1>, BOT, <type-of-i2> to Types.lub. But Types.lub needs the list without
> BOT, so filtering BOT(s) out of the list.
looks sensible
-------------
Marked as reviewed by vromero (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/583
    
    
More information about the compiler-dev
mailing list