mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
17 lines
291 B
Kotlin
Vendored
17 lines
291 B
Kotlin
Vendored
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"
|
|
}
|
|
} |