RFR: 8340145: Problem with generic pattern matching results in internal compiler error [v2]
Aggelos Biboudis
abimpoudis at openjdk.org
Mon Nov 18 14:09:37 UTC 2024
> 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;
> };
> }
Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
Add test with multiple bounds
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/21606/files
- new: https://git.openjdk.org/jdk/pull/21606/files/b8f0742f..f9f98886
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=21606&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=21606&range=00-01
Stats: 18 lines in 1 file changed: 17 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/21606.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21606/head:pull/21606
PR: https://git.openjdk.org/jdk/pull/21606
More information about the compiler-dev
mailing list