Files
kotlin-fork/js/js.translator/testData/extensionFunction/cases/extensionInsideFunctionLiteral.kt
T
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00

22 lines
310 B
Kotlin
Vendored

package foo
class M() {
var m = 0
fun eval() {
var d = {
var c = fun Int.(): Int = this + 3
m += 3.c()
}
d();
}
}
fun box(): Boolean {
var a = M()
if (a.m != 0) return false;
a.eval()
if (a.m != 6) return false;
return true;
}