KT-14341 for to stdlib to forEach: if the loop variable is not used in the last/innerest statement the conversion is not proposed

#KT-14341 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-10-15 23:17:50 +03:00
parent 5ca7688b7c
commit a87ca8432e
15 changed files with 106 additions and 6 deletions
@@ -1,6 +1,6 @@
// WITH_RUNTIME
// IS_APPLICABLE: false
// IS_APPLICABLE_2: false
// INTENTION_TEXT: "Replace with 'filter{}.forEach{}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.forEach{}'"
fun foo(list: List<String>, target: MutableList<Int>) {
<caret>for (s in list) {
if (s.length > 0)