Remove parentheses: add semicolon before lambda if necessary

In 2010b175, it was suggested just not to suggest parentheses removal.
However, it contradicts with behaviour of "Replace contains" which
adds semicolon before lambda in this case. So in this commit I made
behaviour of remove parentheses the same.

This commit reverts production part of 2010b175
Fixes failing test of "replace contains"
This commit is contained in:
Mikhail Glukhikh
2019-01-10 10:45:46 +03:00
parent 62222460b6
commit 18ea86cfb4
8 changed files with 37 additions and 18 deletions
@@ -1,5 +1,3 @@
// IS_APPLICABLE: false
fun main() {
foo()
<caret>({ foo() } as? () -> Unit)
@@ -0,0 +1,6 @@
fun main() {
foo();
{ foo() } as? () -> Unit
}
fun foo() {}
@@ -1,5 +1,3 @@
// IS_APPLICABLE: false
fun main() {
foo()
<caret>({ foo() }.invoke())
@@ -0,0 +1,6 @@
fun main() {
foo();
{ foo() }.invoke()
}
fun foo() {}