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:
Vendored
+3
-3
@@ -1,9 +1,9 @@
|
||||
package primitivesCoertion
|
||||
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.sequences.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = buildSequence {
|
||||
val a = sequence {
|
||||
yield(1)
|
||||
val a = awaitSeq()
|
||||
//Breakpoint!
|
||||
@@ -12,7 +12,7 @@ fun main(args: Array<String>) {
|
||||
println(a.toList())
|
||||
}
|
||||
|
||||
suspend fun SequenceBuilder<Int>.awaitSeq(): Int = 42
|
||||
suspend fun SequenceScope<Int>.awaitSeq(): Int = 42
|
||||
|
||||
// EXPRESSION: a
|
||||
// RESULT: 42: I
|
||||
|
||||
Reference in New Issue
Block a user