Add inspection for usages of Kotlin internal declarations in Java
#KT-11393 Fixed
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
internal class SomeInternalClass
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
import kotlin.collections.MapsKt;
|
||||
import kotlin.internal.PlatformImplementations; // Internal in stdlib, error
|
||||
import java.util.function.Consumer;
|
||||
|
||||
|
||||
public class SomeClass extends PlatformImplementations { // Internal in stdlib, error
|
||||
public static void doSomething() {
|
||||
PlatformImplementations a; // Internal in stdlib, error
|
||||
Integer c;
|
||||
MapsKt.mapCapacity(3); // Internal in stdlib, error
|
||||
Consumer<Integer> fun = MapsKt::mapCapacity; // Internal in stdlib, error
|
||||
SomeInternalClass b = new SomeInternalClass(); // Internal in same module, OK
|
||||
|
||||
SomeInternalClassInOtherModule b = new SomeInternalClassInOtherModule(); // Internal in other module, error
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user