Files
kotlin-fork/idea/testData/inspectionsLocal/foldInitializerAndIfToElvis/ComplexExpression.kt
T
2020-09-29 23:58:29 +09:00

12 lines
209 B
Kotlin
Vendored

// PROBLEM: none
private fun foo(arg: Any): Int {
val x =
if (arg is String)
(arg.length + 1)
else
arg.hashCode()
if (<caret>x == null) return 0
return x
}