Integrated: 8329115: Crash involving return from inner switch
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Mar 27 09:41:30 UTC 2024
On Tue, 26 Mar 2024 18:05:36 GMT, Aggelos Biboudis <abimpoudis at 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;
> };
> }
> };
> }
This pull request has now been integrated.
Changeset: 4dfcc6df
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4dfcc6df173d91b9b0b73d1ac3008e7cbb283871
Stats: 26 lines in 3 files changed: 26 ins; 0 del; 0 mod
8329115: Crash involving return from inner switch
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/18494
More information about the compiler-dev
mailing list