Files
kotlin-fork/compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.fir.kt
T
Denis Zharkov 9668a60151 FIR: Explicitlty separate static and member scopes
For Java, they have rather different semantics considering "overrides"
and obtaining functions/properties from supertypes

See the Java statics implementation
2020-06-26 16:52:10 +03:00

33 lines
463 B
Kotlin
Vendored

// FILE: I.java
public interface I {
int a = 1;
static void foo() {}
}
// FILE: C.java
public class C implements I {
static int b = 1;
static void bar() {}
}
// FILE: test.kt
class K : C()
fun main() {
I.a
I.foo()
C.a
C.b
C.<!UNRESOLVED_REFERENCE!>foo<!>()
C.bar()
K.<!UNRESOLVED_REFERENCE!>a<!>
K.<!UNRESOLVED_REFERENCE!>b<!>
K.<!UNRESOLVED_REFERENCE!>foo<!>()
K.<!UNRESOLVED_REFERENCE!>bar<!>()
}