mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 00:19:11 +07:00
see JEP-397 - Sealed classes and conversions for details GitOrigin-RevId: 297386ccd61f7762508b630a60894360215d9e11
9 lines
311 B
Java
9 lines
311 B
Java
class Foo {
|
|
static void test(Foo foo) {
|
|
if (<error descr="Inconvertible types; cannot cast 'Foo' to 'I'"><warning descr="Condition 'foo instanceof I' is always 'false'">foo instanceof I</warning></error>)
|
|
System.out.println("This is a Foo");
|
|
}
|
|
}
|
|
|
|
sealed interface I {}
|
|
final class C implements I {} |