Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/iterateOverListOfInlineClassValues.kt
T

15 lines
263 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
inline class Foo(val arg: String)
fun box(): String {
val ls = listOf(Foo("abc"), Foo("def"))
var res = ""
for (el in ls) {
res += el.arg
}
return if (res != "abcdef") "Fail" else "OK"
}