KT-1053 Incorrect auto formatting of when expression

This commit is contained in:
Nikolay Krasko
2012-01-18 19:27:41 +04:00
parent cbcfeaa1b7
commit dd1fd26461
15 changed files with 321 additions and 9 deletions
+5
View File
@@ -0,0 +1,5 @@
fun some() {
for (var a in 1..12) {
a += 1
}
}
@@ -0,0 +1,5 @@
fun some() {
for (var a in 1..12) {
a += 1
}
}
+3
View File
@@ -0,0 +1,3 @@
class Some() {
val a : Int
}
+3
View File
@@ -0,0 +1,3 @@
class Some() {
val a : Int
}
+6
View File
@@ -0,0 +1,6 @@
fun testSome() {
var a = 12
for (var a in 1..10)
a = 11
a = 10
}
@@ -0,0 +1,6 @@
fun testSome() {
var a = 12
for (var a in 1..10)
a = 11
a = 10
}
+6
View File
@@ -0,0 +1,6 @@
fun some() {
if (3 > 2)
2
else
1
}
+6
View File
@@ -0,0 +1,6 @@
fun some() {
if (3 > 2)
2
else
1
}
+6
View File
@@ -0,0 +1,6 @@
fun some(x : Any) {
when (x) {
is Int -> 0
else -> 1
}
}
+9
View File
@@ -0,0 +1,9 @@
fun some(x : Any) {
when (x) {
is Int ->
0
else -> {
1
}
}
}
@@ -0,0 +1,9 @@
fun some(x : Any) {
when (x) {
is Int ->
0
else -> {
1
}
}
}
+6
View File
@@ -0,0 +1,6 @@
fun some(x : Any) {
when (x) {
is Int -> 0
else -> 1
}
}