Disable callable references to suspend functions in 1.2
#KT-25604: Fixed
This commit is contained in:
Vendored
+4
-3
@@ -1,12 +1,13 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
var result = ""
|
||||
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, JS_IR, NATIVE
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_COROUTINES
|
||||
// WITH_REFLECT
|
||||
|
||||
|
||||
+4
-3
@@ -1,15 +1,16 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, NATIVE, JS_IR
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
|
||||
+4
-3
@@ -1,15 +1,16 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, JS_IR, NATIVE
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
// WITH_REFLECT
|
||||
// COMMON_COROUTINES_TEST
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
|
||||
+3
-2
@@ -1,16 +1,17 @@
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS, NATIVE, JS_IR
|
||||
// IGNORE_LIGHT_ANALYSIS
|
||||
|
||||
// LANGUAGE_VERSION: 1.2
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.jvm.internal.FunctionBase
|
||||
import helpers.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
suspend fun builder(c: suspend () -> Unit) {
|
||||
c.startCoroutine(EmptyContinuation)
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, NATIVE
|
||||
// COMMON_COROUTINES_TEST
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
fun box(): String {
|
||||
suspend fun bar() {}
|
||||
|
||||
+5
-4
@@ -1,11 +1,12 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JS, JS_IR
|
||||
// COMMON_COROUTINES_TEST
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_COROUTINES
|
||||
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
suspend inline fun Long.longArgs(a: Long, b: Long, c: Long) = suspendCoroutineUninterceptedOrReturn<Long> {
|
||||
it.resume(this + a + b + c)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// WITH_COROUTINES
|
||||
// COMMON_COROUTINES_TEST
|
||||
// LANGUAGE_VERSION: 1.3
|
||||
import helpers.*
|
||||
import COROUTINES_PACKAGE.*
|
||||
import COROUTINES_PACKAGE.intrinsics.*
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
suspend fun suspendWithValue(result: () -> String): String = suspendCoroutineUninterceptedOrReturn { x ->
|
||||
x.resume(result())
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: +ReleaseCoroutines
|
||||
// !API_VERSION: 1.3
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
|
||||
Reference in New Issue
Block a user