35c7c4afd8
When property initializer of some inner entity (e.g. anonymous object) contains a reference to some outer entity (say, a property of the outer class), we need to make sure we called "lookupInContext" on this entity's owner class, so that "setCaptureThis" was called on the appropriate closure #KT-4176 Fixed
18 lines
198 B
Kotlin
Vendored
18 lines
198 B
Kotlin
Vendored
open class Z(val s: Int) {
|
|
open fun a() {}
|
|
}
|
|
|
|
class B(val x: Int) {
|
|
fun foo() {
|
|
class X : Z(x) {
|
|
|
|
}
|
|
X()
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
B(1).foo()
|
|
return "OK"
|
|
}
|