Files
kotlin-fork/js/js.translator/testData/closure/cases/closureThisInExtLambdaInsideMethod.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

12 lines
255 B
Kotlin

// KT-4600 Generated wrong code when capturing `this` in extension function inside a method
package foo
fun run<T>(f: Int.() -> T) = 1.f()
public class Foo(val trigger: () -> Any) {
fun test() = run {trigger()};
}
fun box() = Foo({ "OK" }).test()