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,3 +1,5 @@
// !LANGUAGE: +ReleaseCoroutines
// !API_VERSION: 1.3
// !DIAGNOSTICS: -UNUSED_VARIABLE
suspend fun foo() {}
@@ -1,3 +1,5 @@
// !LANGUAGE: +ReleaseCoroutines
// !API_VERSION: 1.3
// SKIP_TXT
fun <R> suspend(block: suspend () -> R): suspend () -> R = block
@@ -1,3 +1,5 @@
// !LANGUAGE: +ReleaseCoroutines
// !API_VERSION: 1.3
// SKIP_TXT
fun <R> suspend(block: R) = block
@@ -1,3 +1,5 @@
// !LANGUAGE: +ReleaseCoroutines
// !API_VERSION: 1.3
// SKIP_TXT
fun bar() {
suspend {
@@ -1,3 +1,5 @@
// !LANGUAGE: +ReleaseCoroutines
// !API_VERSION: 1.3
// SKIP_TXT
import kotlin.suspend as suspendLambda