RFR: 8301858: Verification error when compiling switch with record patterns
Aggelos Biboudis
abimpoudis at openjdk.org
Tue Feb 7 10:37:47 UTC 2023
On Mon, 6 Feb 2023 13:06:30 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> When unrolling/translating record patterns with an unconditional case, we were translating the last/innermost case to`case null, default` skipping the initialization of a bound variable `o` in the example below:
>
> switch (..) {
> case R1(Object o):
> return meth_O(o);
> }
> =>
> switch (..) {
> case R1:
> switch(..) {
> case null, default:
> return meth_O(o);
> }
> }
>
> This PR addresses that by emitting the correct label instead of default.
One test is failing. Do not integrate yet
-------------
PR: https://git.openjdk.org/jdk/pull/12438
More information about the compiler-dev
mailing list