Integrated: 8340145: Problem with generic pattern matching results in internal compiler error
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Nov 20 10:33:26 UTC 2024
On Mon, 21 Oct 2024 12:01:11 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> In the following code, when calculating recursively the covered binding patterns, the nested case assumed that the direct supertype of `T2` will always be represented by a `ClassSymbol`. This PR intervenes the erasure calculation.
>
>
> static <T, T2 extends T> T unwrapOrElse(Option<T2> option, T defaultValue) {
> return switch (option) {
> case Option.Some(T2 value) -> value;
> case Option.None<T2> _ -> defaultValue;
> };
> }
This pull request has now been integrated.
Changeset: 3a4a9b7a
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3a4a9b7af7693a836c3caa3112d0d68100535b28
Stats: 67 lines in 2 files changed: 66 ins; 0 del; 1 mod
8340145: Problem with generic pattern matching results in internal compiler error
Reviewed-by: jlahoda
-------------
PR: https://git.openjdk.org/jdk/pull/21606
More information about the compiler-dev
mailing list