mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 15:50:52 +07:00
[java-highlighting] IDEA-324708 Coverage with 2 sealed hierarchies
GitOrigin-RevId: c38172bc2a5f16c29a7587f798d889da1c9d80eb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
20285c8d02
commit
9add8b349e
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user