[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: 8329115: Crash involving return from inner switch
From:       Jan Lahoda <jlahoda () openjdk ! org>
Date:       2024-03-27 9:05:31
Message-ID: ZO9f_BIjuWByvH6hjKbVU8t97w8sP4LScnWMxUrlCuU=.27fb3520-ab4b-4c9a-bfaf-c523fed708e1 () github ! com
[Download RAW message or body]

On Tue, 26 Mar 2024 18:05:36 GMT, Aggelos Biboudis <abimpoudis@openjdk.org> wrote:

> When a `return` is used erroneously in a `switch`, attribution should continue for \
> the `tree.expr` of a return node if exists. 
> 
> int test() {
> return switch (new R1()) {
> case R1() -> {
> return switch (new R2()) { // crashes, instead it should just be the error: attempt \
> to return out of a switch expression case R2() -> 1;
> };
> }
> };
> }

Looks good to me, thanks!

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

Marked as reviewed by jlahoda (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18494#pullrequestreview-1962690780


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic