RFR: 8323502: javac crash with wrongly typed method block in Flow
Jan Lahoda
jlahoda at openjdk.org
Mon Feb 5 08:44:01 UTC 2024
On Wed, 17 Jan 2024 15:45:09 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> The observation is that the `tree.target` of the RHS's `yield` was not set properly to point at the outer switch. As a result, the assertion was hit in `clearPendingExits` with a wrong set of pending exits.
>
> The cause was that the `tree` was not attributed since `visitSwitchExpression` was short-circuited to `return;` and `visitYield` was never setting the `target`. As a result, `resolveJump` was not actually resolving the jump correctly.
>
> thx @lahodaj for the help!
To me, looks good.
-------------
Marked as reviewed by jlahoda (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17466#pullrequestreview-1862147664
More information about the compiler-dev
mailing list