Added static methods, nested classes and companion object from superclasses.
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
static void foo() {}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
open class B : A() {
|
||||
companion object {
|
||||
fun foo() = 1
|
||||
}
|
||||
|
||||
init {
|
||||
val a: Int = foo()
|
||||
}
|
||||
}
|
||||
|
||||
class C: B() {
|
||||
init {
|
||||
val a: Int = foo()
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: X.java
|
||||
public class X extends B {
|
||||
static double foo() {
|
||||
return 1.0
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
class Y: X() {
|
||||
init {
|
||||
val a: Double = <!TYPE_MISMATCH!>foo()<!> // todo
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user