Extract Function: Support implicit abnormal exits via Nothing-typed expressions
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_RUNTIME
|
||||
// PARAM_DESCRIPTOR: value-parameter a: kotlin.Int? defined in foo
|
||||
// PARAM_TYPES: kotlin.Int?
|
||||
fun foo(a: Int?): Int {
|
||||
return i(a)
|
||||
}
|
||||
|
||||
private fun i(a: Int?): Int {
|
||||
val n = a ?: error("")
|
||||
return n + 1
|
||||
}
|
||||
Reference in New Issue
Block a user