Files
kotlin-fork/idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/hasThrow2.kt
T
2019-09-24 12:11:41 +03:00

8 lines
197 B
Kotlin
Vendored

// PROBLEM: none
fun test(str: String?): String? {
val <caret>some = if (str != null) str + str else throw Exception()
return when (some) {
"some" -> some
else -> ""
}
}