Minor. Fix test.

This commit is contained in:
Ilmir Usmanov
2018-07-30 16:02:57 +03:00
parent acd5b62148
commit 4b03db771a
2 changed files with 4 additions and 20 deletions
@@ -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>()
}
@@ -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 {