Fix SimplifiableCallChain inspection quick fix removes comments for intermediate operations

This commit is contained in:
Burak Eregar
2019-03-13 01:30:04 +00:00
committed by Mikhail Glukhikh
parent 8728bc0820
commit db4144426a
8 changed files with 41 additions and 0 deletions
@@ -0,0 +1,4 @@
// WITH_RUNTIME
val v1 = listOf(1, 2, 3, 11, 33, 25, 100)
.filter<caret> { it % 2 == 0 } // Some Comment
.isNotEmpty() // Some Additional Comment
@@ -0,0 +1,3 @@
// WITH_RUNTIME
val v1 = // Some Comment
listOf(1, 2, 3, 11, 33, 25, 100).any { it % 2 == 0 } // Some Additional Comment
@@ -0,0 +1,4 @@
// WITH_RUNTIME
val v1 = listOf(1, 2, 3, 11, 33, 25, 100)
.filter<caret> { it % 2 == 0 } // Some Comment
.isNotEmpty()
@@ -0,0 +1,3 @@
// WITH_RUNTIME
val v1 = // Some Comment
listOf(1, 2, 3, 11, 33, 25, 100).any { it % 2 == 0 }
@@ -0,0 +1,4 @@
// WITH_RUNTIME
val v1 = listOf(1, 2, 3, 11, 33, 25, 100)
.filter<caret> { it % 2 == 0 }
.isNotEmpty() // Some Comment
@@ -0,0 +1,2 @@
// WITH_RUNTIME
val v1 = listOf(1, 2, 3, 11, 33, 25, 100).any { it % 2 == 0 } // Some Comment