Files
Mikhail Pyltsin fe129bc95c [java-highlighting] IDEA-362977 Incorrectly check hierarchy for permitted classes
GitOrigin-RevId: 2657b06d91569f31b08eb82c14a9340b7b0ca56c
2025-01-16 17:04:28 +00:00

36 lines
676 B
Java

package org;
public class DoubleInnerPermitClass {
//
// Root
// ^
// |
// +---+----+
// | |
// Left1 |
// ^ |
// | Right
// Left2 ^
// ^ |
// | |
// +--+-----+
// |
// Impl
//
public sealed interface Root {}
public sealed interface Left1 extends Root {}
public sealed interface Left2 extends Left1 {}
public sealed interface Right extends Root {}
public record Impl() implements Left2, Right {}
public static void tryArrayComponentType(Root vt) {
switch (vt) {
case Left1 _ -> {}
}
}
}