d988853c11
Now this:
class C {
val x = something
val y by x::property
}
is *exactly* the same as this:
class C {
val x = something
val y get() = x.property
}
(plus a `getY$delegate` method)
17 lines
172 B
Kotlin
Vendored
17 lines
172 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
var result = "Fail"
|
|
|
|
object O {
|
|
val z = 42
|
|
init { result = "OK" }
|
|
}
|
|
|
|
class A {
|
|
val x by O::z
|
|
}
|
|
|
|
fun box(): String {
|
|
A()
|
|
return result
|
|
}
|