Integrated: 8357361: Exception when compiling switch expression with inferred type

Jan Lahoda jlahoda at openjdk.org
Thu May 22 05:58:56 UTC 2025


On Wed, 21 May 2025 15:30:25 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> There's a missing erasure in `TransTypes`, which eventually leads to an attempt to cast to a captured wildcard type (for the case shown in the bug report), which cannot be done. (In this case, `TransTypes` will report an error.)
> 
> (There's a unused/unnecessary code in the close vicinity of the added erasure, and a similar code in `visitSwitch`. I could resist deleting that unnecessary code.)

This pull request has now been integrated.

Changeset: ec670652
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ec6706520b87eff3d87b3b65f3caa39db2d96581
Stats:     30 lines in 2 files changed: 21 ins; 6 del; 3 mod

8357361: Exception when compiling switch expression with inferred type

Reviewed-by: vromero

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

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


More information about the compiler-dev mailing list