Add diagnostics tests. Forbid callable reference to coroutineContext
#KT-16908: Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// !LANGUAGE: +Coroutines
|
||||
// SKIP_TXT
|
||||
|
||||
import kotlin.reflect.KSuspendFunction0
|
||||
|
||||
fun test(c: KSuspendFunction0<Unit>) {
|
||||
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>c<!>()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// !LANGUAGE: +Coroutines
|
||||
// SKIP_TXT
|
||||
|
||||
suspend fun foo() {}
|
||||
|
||||
val ref = ::foo
|
||||
Reference in New Issue
Block a user