Keep braces in redundant cascade if #KT-19704 Fixed

This commit is contained in:
scache
2017-08-16 20:19:33 +03:00
committed by Mikhail Glukhikh
parent 97e4dbe330
commit ba19931aef
14 changed files with 201 additions and 17 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else if (<caret>true) {
2
}
}
@@ -0,0 +1,12 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else {
2
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else if (<caret>true) 2
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else 2
}
@@ -0,0 +1,16 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else if (<caret>true) {
foo(1)
2
}
else {
3
}
}
@@ -0,0 +1,13 @@
// WITH_RUNTIME
fun foo(x: Int) {}
fun bar(s: String?) {
if (s == null) {
1
}
else {
foo(1)
2
}
}
@@ -0,0 +1,14 @@
fun foo(s: String) {}
fun bar(s: String?) {
if (s == null) {
foo("a")
foo("b")
}
else if (<caret>true) {
}
else {
foo("c")
foo("d")
}
}
@@ -0,0 +1,10 @@
fun foo(s: String) {}
fun bar(s: String?) {
if (s == null) {
foo("a")
foo("b")
}
else {
}
}
@@ -0,0 +1,15 @@
fun foo(s: String) {}
fun bar(s: String?) {
if (s == null) {
1
}
else if (<caret>true) {
foo("a")
foo("b")
2
}
else {
3
}
}
@@ -0,0 +1,12 @@
fun foo(s: String) {}
fun bar(s: String?) {
if (s == null) {
1
}
else {
foo("a")
foo("b")
2
}
}