Files
kotlin/compiler/testData/codegen/box/controlStructures/forNullableCharInString.kt

13 lines
219 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
fun box(): String {
val str = "abcd"
var r = ""
for (c: Char? in str) {
r = r + c ?: "?"
}
if (r != "abcd") throw AssertionError()
return "OK"
}