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