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

12 lines
261 B
Kotlin
Vendored

// WITH_RUNTIME
// IS_APPLICABLE: false
fun foo(list: List<String>, o: Int?): Int? {
<caret>for (s in list) {
val length = s.length + o!!
if (length > 0) {
val x = length * o
return x
}
}
return null
}