5679acbbdb
- The semantics of a non-static declared member scope should be as follows: For a variable `c: C` of class type `C`, the declared member scope should contain all members `x` accessible as `c.x` (visibility notwithstanding) which are *also* explicitly declared in `C`. - Classifiers are not accessible as properties of a variable `c`, only as static members of the class `C` itself, so non-static declared member scopes should not contain any classifiers. ^KT-61800
36 lines
476 B
Kotlin
Vendored
36 lines
476 B
Kotlin
Vendored
// class: test/KotlinClass
|
|
// FILE: JavaClass.java
|
|
package test
|
|
|
|
public abstract class JavaClass {
|
|
public void perform() {
|
|
}
|
|
|
|
public int x = 0;
|
|
|
|
public static void hello() {
|
|
}
|
|
|
|
public static int y = 1;
|
|
|
|
public static class C1 {
|
|
}
|
|
}
|
|
|
|
// FILE: KotlinClass.kt
|
|
package test
|
|
|
|
class KotlinClass : JavaClass() {
|
|
fun foo(): Int = 5
|
|
|
|
val bar: String = ""
|
|
|
|
class C2
|
|
|
|
object O2
|
|
|
|
companion object {
|
|
val baz: String = ""
|
|
}
|
|
}
|