35f80c04ca
as well as all other implicit receivers.
17 lines
327 B
Kotlin
Vendored
17 lines
327 B
Kotlin
Vendored
|
|
@file:Import("import-common.main.kts")
|
|
@file:Import("import-middle.main.kts")
|
|
|
|
sharedVar = sharedVar + 1
|
|
|
|
class CapturingClass1 {
|
|
val value = sharedVar
|
|
}
|
|
|
|
class CapturingClass2 {
|
|
fun f() = CapturingClass1().value
|
|
}
|
|
|
|
println("${SharedObject.greeting} ${from.msg} main")
|
|
println("sharedVar == ${CapturingClass2().f()}")
|