[java-highlighting] IDEA-324708 Coverage with 2 sealed hierarchies

GitOrigin-RevId: c38172bc2a5f16c29a7587f798d889da1c9d80eb
This commit is contained in:
Mikhail Pyltsin
2023-07-10 13:58:21 +02:00
committed by intellij-monorepo-bot
parent 20285c8d02
commit 9add8b349e
2 changed files with 16 additions and 1 deletions

View File

@@ -93,4 +93,19 @@ class X {
}
native static boolean predicate();
sealed interface I1 {}
sealed interface I2 {}
record R1() implements I1 {}
record R2() implements I2 {}
record R3() implements I1, I2 {};
public class Test22{
public <T extends I1 & I2> void test(T c) {
switch (c) {
case <error descr="Incompatible types. Found: 'X.R2', required: 'T'">R2 r1</error> -> System.out.println(5);
case R3 r1 -> System.out.println(1);
}
}
}
}