Files
kotlin-fork/backend.native/tests/external/codegen/box/classes/kt8011.kt
T
2017-03-13 15:31:46 +03:00

20 lines
309 B
Kotlin

// WITH_RUNTIME
fun testFun1(str: String): String {
val local = str
class Local {
fun foo() = str
}
val list = listOf(0).map { Local() }
return list[0].foo()
}
fun box(): String {
return when {
testFun1("test1") != "test1" -> "Fail #1"
else -> "OK"
}
}