Supported mapNotNullTo

This commit is contained in:
Valentin Kipyatkov
2016-04-22 11:56:45 +03:00
parent 8c7cdf1bf8
commit 2652ea4233
5 changed files with 43 additions and 8 deletions
@@ -0,0 +1,8 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'mapNotNullTo(){}'"
fun foo(list: List<String?>, target: MutableList<Int>) {
<caret>for (s in list) {
val length = s?.length ?: continue
target.add(length)
}
}