8 lines
230 B
Kotlin
Vendored
8 lines
230 B
Kotlin
Vendored
fun baz(s: String?): Int {
|
|
if (s == null) return 0
|
|
return <info descr="Smart cast to kotlin.String">when</info>(<info descr="Smart cast to kotlin.String">s</info>) {
|
|
"abc" -> s
|
|
else -> "xyz"
|
|
}.length
|
|
}
|