Integrated: 8294583: JShell: NPE in switch with non existing record pattern

Aggelos Biboudis abimpoudis at openjdk.org
Fri Nov 25 12:34:30 UTC 2022


On Sun, 20 Nov 2022 12:20:21 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

> This fixes a situation where attribution errors are not short circuiting the compilation of an expression, e.g., in case of a declaration missing in the JShell evaluation of a switch expression.
> 
> Now there are two options:
> 
> 1. handle this in `handleSwitch` (specific to switches, and avoid the `NPE` raised according to the JBS description)
> 2. handle this centrally in the corresponding task that is used in two places: 1) JShell evaluation and 2) `tools.javac.combo`.
> 
> I adopted the second option. Any thoughts?

This pull request has now been integrated.

Changeset: 4f655702
Author:    Aggelos Biboudis <abimpoudis at openjdk.org>
Committer: Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/4f65570204e2d38415e7761bd81660b081eae882
Stats:     49 lines in 2 files changed: 49 ins; 0 del; 0 mod

8294583: JShell: NPE in switch with non existing record pattern

Reviewed-by: jlahoda

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

PR: https://git.openjdk.org/jdk/pull/11251


More information about the compiler-dev mailing list