Split 'nothingTypedSuspendFunction' test into two separate tests (for old and new coroutines)

This commit is contained in:
victor.petukhov
2019-03-16 21:39:44 +03:00
parent 29493a4977
commit 9a2178d96b
6 changed files with 22 additions and 11 deletions
@@ -0,0 +1,9 @@
// !DIAGNOSTICS: -DEPRECATION
// Tail calls are not allowed to be Nothing typed. See KT-15051
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun suspendLogAndThrow(exception: Throwable): Nothing = <!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>suspendCoroutineUninterceptedOrReturn<!> { c ->
c.resumeWithException(exception)
COROUTINE_SUSPENDED
}
@@ -1,7 +1,6 @@
// Tail calls are not allowed to be Nothing typed. See KT-15051
// COMMON_COROUTINES_TEST
import COROUTINES_PACKAGE.*
import COROUTINES_PACKAGE.intrinsics.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
suspend fun suspendLogAndThrow(exception: Throwable): Nothing = <!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>suspendCoroutineUninterceptedOrReturn<!> { c ->
c.<!IMPLICIT_NOTHING_AS_TYPE_PARAMETER!>resumeWithException<!>(exception)
@@ -0,0 +1,3 @@
package
public suspend fun suspendLogAndThrow(/*0*/ exception: kotlin.Throwable): kotlin.Nothing