Inspection: Simplify Nested forEach/onEach in also/apply to onEach

^KT-40283 Fixed
This commit is contained in:
Enteerman
2020-07-21 20:50:07 +08:00
committed by Vladimir Dolzhenko
parent 85d99612a2
commit c3aeaa9052
25 changed files with 423 additions and 0 deletions
@@ -0,0 +1,6 @@
// PROBLEM: none
// WITH_RUNTIME
fun test(){
val a = listOf(1,2,3)
"".also<caret> { a.forEach { it + 2 } }
}