Files
kotlin-fork/js/js.translator/testData/box/closure/superCallInsideLambda.kt
T

26 lines
398 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1292
var result = ""
fun <T> call(lambda: () -> T): T {
return lambda()
}
abstract class Parent {
val o = "O"
val k = "K"
protected fun getO() = o
protected fun getK() = k
}
class Child : Parent() {
fun runTest() {
result += call { super.getO() + super.getK() }
}
}
fun box(): String {
Child().runTest()
return result
}