KT-5927 Join Lines could merge nested if's

#KT-5927 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-12-16 14:28:56 +01:00
parent bc631d7aee
commit 3db51cfcd8
11 changed files with 91 additions and 7 deletions
@@ -0,0 +1,7 @@
fun foo() {
<caret>if (a) {
if (b) {
foo()
}
}
}
@@ -0,0 +1,5 @@
fun foo() {
if (a && b) <caret>{
foo()
}
}
@@ -0,0 +1,5 @@
fun foo() {
<caret>if (a && b) {
if (c && d) foo()
}
}
@@ -0,0 +1,3 @@
fun foo() {
if (a && b && c && d) <caret>foo()
}
@@ -0,0 +1,5 @@
fun foo() {
<caret>if (a && b) {
if (c || d) foo()
}
}
@@ -0,0 +1,3 @@
fun foo() {
if (a && b && (c || d)) <caret>foo()
}
@@ -0,0 +1,5 @@
fun foo() {
<caret>if (a) {
if (b) foo()
}
}
@@ -0,0 +1,3 @@
fun foo() {
if (a && b) <caret>foo()
}