Use new sequence builders in tests

Coroutine tests will fail when LV=1.2 because there're no such builders
in kotlin.coroutines.experimental.

#KT-26678
This commit is contained in:
Ilya Gorbunov
2018-09-13 18:07:08 +03:00
parent 7a7fa56d74
commit 1b889c976a
4 changed files with 8 additions and 11 deletions
@@ -1,10 +1,9 @@
// LANGUAGE_VERSION: 1.3
import kotlin.coroutines.*
import kotlin.sequences.*
fun main(args: Array<String>) {
val s = buildSequence {
val s = sequence {
yield(1)
val a = awaitSeq()
println(a) // (1)
@@ -12,7 +11,7 @@ fun main(args: Array<String>) {
println(s.toList())
}
suspend fun SequenceBuilder<Int>.awaitSeq(): Int = 42
suspend fun SequenceScope<Int>.awaitSeq(): Int = 42
// 1 LOCALVARIABLE a I L18 L22 3
// 1 LINENUMBER 10 L18
// 1 LINENUMBER 9 L18