Extract Function: Allow to combine throws with other exit points
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
// NEXT_SIBLING:
|
||||
fun i(a: Int, b: Int): Int {
|
||||
return if (a > 0) throw Exception("") else a + b
|
||||
}
|
||||
|
||||
fun foo(a: Int): Int {
|
||||
val b: Int = 1
|
||||
|
||||
val t = i(a, b)
|
||||
return t
|
||||
}
|
||||
Reference in New Issue
Block a user