Call chain into sequence: add 'flatten' to conversion targets #KT-26969 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-10-11 12:34:37 +09:00
committed by Mikhail Glukhikh
parent bd27460694
commit 3f252b15e1
6 changed files with 27 additions and 0 deletions
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test() {
listOf(listOf(1), listOf(2)).<caret>flatten().filter { it > 1 }
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test() {
listOf(listOf(1), listOf(2)).asSequence().flatten().filter { it > 1 }.toList()
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test() {
listOf(listOf(1), listOf(2, 3)).<caret>filter { it.size > 1 }.flatten()
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun test() {
listOf(listOf(1), listOf(2, 3)).asSequence().filter { it.size > 1 }.flatten().toList()
}