KTIJ-25530 [Analysis API] Add missing test cases for Java statics
Can be done now because KT-58980 is fixed
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
KotlinChild.nonStaticFieldFromBase
|
||||
dependency.Child.STATIC_CONSTANT_FROM_BASE
|
||||
dependency.Child.staticFunFromBase
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// FILE: main.kt
|
||||
import dependency.Base
|
||||
import dependency.Child
|
||||
import dependency.Child.staticFunFromBase
|
||||
import dependency.Child.STATIC_CONSTANT_FROM_BASE
|
||||
import KotlinChild.nonStaticFieldFromBase
|
||||
|
||||
fun usage() {
|
||||
Child.staticFunFromBase()
|
||||
Child.STATIC_CONSTANT_FROM_BASE
|
||||
KotlinChild.nonStaticFieldFromBase
|
||||
}
|
||||
|
||||
object KotlinChild : Base()
|
||||
|
||||
// FILE: dependency/Base.java
|
||||
package dependency;
|
||||
|
||||
public class Base {
|
||||
public static void staticFunFromBase() {}
|
||||
public static String STATIC_CONSTANT_FROM_BASE = "";
|
||||
|
||||
public String nonStaticFieldFromBase = "";
|
||||
}
|
||||
|
||||
// FILE: dependency/Child.java
|
||||
package dependency;
|
||||
|
||||
public class Child extends Base {}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// FILE: main.kt
|
||||
import dependency.Base
|
||||
import dependency.Child.staticFunFromBase
|
||||
import dependency.Child.STATIC_CONSTANT_FROM_BASE
|
||||
import KotlinChild.nonStaticFieldFromBase
|
||||
|
||||
fun usage() {
|
||||
staticFunFromBase()
|
||||
STATIC_CONSTANT_FROM_BASE
|
||||
nonStaticFieldFromBase
|
||||
}
|
||||
|
||||
object KotlinChild : Base()
|
||||
|
||||
// FILE: dependency/Base.java
|
||||
package dependency;
|
||||
|
||||
public class Base {
|
||||
public static void staticFunFromBase() {}
|
||||
public static String STATIC_CONSTANT_FROM_BASE = "";
|
||||
|
||||
public String nonStaticFieldFromBase = "";
|
||||
}
|
||||
|
||||
// FILE: dependency/Child.java
|
||||
package dependency;
|
||||
|
||||
public class Child extends Base {}
|
||||
Reference in New Issue
Block a user