KTIJ-717 [Java side inspection]: "implementation of Kotlin sealed"
This commit is contained in:
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
public class JavaTriesToExtendKotlinSealed {
|
||||
|
||||
private static class TryToImplement implements KotlinSealedInterface {}
|
||||
private static interface TryToExtend extends KotlinSealedInterface {}
|
||||
private static class TryToExtendClass extends KotlinSealedClass {}
|
||||
|
||||
class OkToImplement implements KotlinInterface {}
|
||||
interface OkToExtend extends KotlinInterface {}
|
||||
class OkToExtendClass extends KotlinClass{}
|
||||
|
||||
public static void main(String[] args) {
|
||||
KotlinSealedInterface sealedInterface = new KotlinSealedInterface() {}; // anonymouns class implements interface
|
||||
KotlinSealedClass sealedClass = new KotlinSealedClass() {};
|
||||
|
||||
new KotlinInterface() {};
|
||||
new KotlinClass() {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user