Files
kotlin-fork/js/js.translator/testData/closure/cases/closureInWithInsideWith.kt
T
Zalim Bashorov fb7165c7fa JS backend: added regression tests for closure bugs.
#KT-4236 In Progress
#KT-4600 In Progress
#KT-4237 In Progress
#KT-4207 In Progress
#KT-4218 In Progress
#KT-4263 Obsolete
2014-03-11 20:04:03 +04:00

26 lines
257 B
Kotlin

// KT-4237 With in with
package foo
class A {
val ok = "OK"
}
class B
fun with<T>(o: T, body: T.() -> Unit) {
o.body()
}
fun box(): String {
var o = ""
with(A()) {
with(B()) {
o = ok
}
}
return o
}