filterNotTo supported

This commit is contained in:
Valentin Kipyatkov
2016-04-21 21:47:28 +03:00
parent 0a61e5b0b2
commit 9ff0f4d736
4 changed files with 28 additions and 10 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filterNotTo(){}'"
fun foo(list: List<String>, target: MutableList<String>) {
<caret>for (s in list) {
if (s.length == 0) continue
target.add(s)
}
}
@@ -0,0 +1,5 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filterNotTo(){}'"
fun foo(list: List<String>, target: MutableList<String>) {
<caret>list.filterNotTo(target) { it.length == 0 }
}