Option to wrap elvis expressions

#KT-21720 Fixed
This commit is contained in:
Dmitry Jemerov
2017-12-08 15:31:27 +01:00
parent d1daca2560
commit eacd010e7e
10 changed files with 49 additions and 16 deletions
+4 -5
View File
@@ -3,15 +3,14 @@ fun test(a: Int?) {
a ?: 42
a ?:
42
a ?: 42
a
?: 42
val some = a ?:
b ?:
12
val some = a
?: b
?: 12
}
// SET_TRUE: ALIGN_MULTILINE_BINARY_OPERATION
+4 -5
View File
@@ -3,15 +3,14 @@ fun test(a: Int?) {
a ?: 42
a ?:
42
a ?: 42
a
?: 42
val some = a ?:
b ?:
12
val some = a
?: b
?: 12
}
// SET_TRUE: ALIGN_MULTILINE_BINARY_OPERATION
+3 -3
View File
@@ -9,9 +9,9 @@ fun test(a: Int?) {
a
?: 42
val some = a ?:
b ?:
12
val some = a
?: b
?: 12
}
// SET_TRUE: ALIGN_MULTILINE_BINARY_OPERATION
+4
View File
@@ -0,0 +1,4 @@
val x = "abc"
?: "def"
// SET_INT: WRAP_ELVIS_EXPRESSIONS = 2
+3
View File
@@ -0,0 +1,3 @@
val x = "abc" ?: "def"
// SET_INT: WRAP_ELVIS_EXPRESSIONS = 2