Disable callable references to suspend functions in 1.2

#KT-25604: Fixed
This commit is contained in:
Ilmir Usmanov
2018-07-30 21:48:55 +03:00
parent ec276a07cb
commit 0c867b4804
27 changed files with 131 additions and 363 deletions
@@ -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 = ""
@@ -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
@@ -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)
@@ -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)
@@ -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)
@@ -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() {}
@@ -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