Files
kotlin-fork/idea/testData/intentions/loopToCallChain/smartCastThisRequired.kt
T
2016-08-16 17:37:56 +03:00

11 lines
257 B
Kotlin
Vendored

// WITH_RUNTIME
// IS_APPLICABLE: false
fun Any.foo(list: List<String>): Int? {
<caret>for (s in list) {
if (s.length > 0 && this is String) {
val result = s.length + length
return result
}
}
return null
}