Minor. Fix test.
This commit is contained in:
+2
-18
@@ -3,18 +3,7 @@ import libO.*
|
||||
|
||||
suspend fun newMain() {
|
||||
newFoo()
|
||||
oldFoo(<error descr="[NO_VALUE_FOR_PARAMETER] No value passed for parameter 'continuation'">)</error>
|
||||
|
||||
oldFoo(
|
||||
object : kotlin.coroutines.experimental.Continuation<Unit> {
|
||||
override val context
|
||||
get() = null!!
|
||||
|
||||
override fun resume(value: Unit) {}
|
||||
|
||||
override fun resumeWithException(exception: Throwable) {}
|
||||
}
|
||||
)
|
||||
<error descr="[DEPRECATION_ERROR] Using 'oldFoo(): Unit' is an error. Experimental coroutine cannot be used with API version 1.3">oldFoo</error>()
|
||||
|
||||
// TODO: actually, it's a bug
|
||||
oldMain()
|
||||
@@ -25,10 +14,5 @@ fun newMain2() {
|
||||
newMain()
|
||||
}
|
||||
|
||||
oldBuilder {
|
||||
<error descr="[ILLEGAL_SUSPEND_FUNCTION_CALL] Suspend function 'newMain' should be called only from a coroutine or another suspend function">newMain</error>()
|
||||
|
||||
// `suspend () -> Unit` becomes (Continuation<Unit> -> Any?)
|
||||
it.resume(Unit)
|
||||
}
|
||||
<error descr="[DEPRECATION_ERROR] Using 'oldFoo(): Unit' is an error. Experimental coroutine cannot be used with API version 1.3"><error descr="[ILLEGAL_SUSPEND_FUNCTION_CALL] Suspend function 'oldFoo' should be called only from a coroutine or another suspend function">oldFoo</error></error>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,8 +7,8 @@ suspend fun oldMain() {
|
||||
}
|
||||
|
||||
fun oldMain2() {
|
||||
<error descr="[VERSION_REQUIREMENT_DEPRECATION_ERROR] 'newBuilder((Continuation<Unit>) -> Any?): Unit' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2">newBuilder</error> {
|
||||
<error descr="[ILLEGAL_SUSPEND_FUNCTION_CALL] Suspend function 'oldMain' should be called only from a coroutine or another suspend function">oldMain</error>()
|
||||
<error descr="[VERSION_REQUIREMENT_DEPRECATION_ERROR] 'newBuilder(suspend () -> Unit): Unit' is only available since Kotlin 1.3 and cannot be used in Kotlin 1.2">newBuilder</error> {
|
||||
oldMain()
|
||||
}
|
||||
|
||||
oldBuilder {
|
||||
|
||||
Reference in New Issue
Block a user