mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Previously we prohibited classes and properties with the same name (now it's unnecessary) Add test for backends that they support qualified (by default object name) member references inside class body
19 lines
225 B
Kotlin
19 lines
225 B
Kotlin
class A {
|
|
private val p: Int
|
|
get() = 4
|
|
|
|
default object B {
|
|
val p: Int
|
|
get() = 6
|
|
}
|
|
|
|
fun a() = p + B.p
|
|
}
|
|
|
|
|
|
fun box(): String {
|
|
if (A().a() != 10) return "Fail"
|
|
|
|
return "OK"
|
|
}
|