Extract Function: Support multi-declaration initializers
#KT-5613 Fixed
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
data class Pair<A, B>(val a: A, val b: B)
|
||||
fun <A, B> A.to(b: B) = Pair(this, b)
|
||||
|
||||
// SIBLING:
|
||||
fun foo() {
|
||||
val (a, b) =
|
||||
if (true) {
|
||||
unit()
|
||||
1 to 2
|
||||
} else {
|
||||
2 to 3
|
||||
}
|
||||
}
|
||||
|
||||
private fun unit() {
|
||||
1 + 1
|
||||
}
|
||||
Reference in New Issue
Block a user