Extract Function: Parenthesize binary expressions if operation reference starts with a new line
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(<selection>1
|
||||
+ 2</selection>)
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(i())
|
||||
}
|
||||
|
||||
private fun i() = (1
|
||||
+ 2)
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(<selection>1 // abc
|
||||
/*def*/ + 2</selection>)
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(i())
|
||||
}
|
||||
|
||||
private fun i() = (1 // abc
|
||||
/*def*/ + 2)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(<selection>1
|
||||
+ 2 - 3</selection>)
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(i())
|
||||
}
|
||||
|
||||
private fun i() = (1
|
||||
+ 2 - 3)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(<selection>1 + 2
|
||||
- 3</selection>)
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
fun foo(i: Int) { }
|
||||
|
||||
fun test() {
|
||||
foo(i())
|
||||
}
|
||||
|
||||
private fun i() = (1 + 2
|
||||
- 3)
|
||||
Reference in New Issue
Block a user