mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 10:21:05 +07:00
36 lines
676 B
Java
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 _ -> {}
|
|
}
|
|
}
|
|
} |