Add diagnostics tests. Forbid callable reference to coroutineContext

#KT-16908: Fixed
This commit is contained in:
Ilmir Usmanov
2018-06-06 18:54:08 +03:00
parent f94b579d19
commit eea95441c5
107 changed files with 780 additions and 4849 deletions
@@ -0,0 +1,8 @@
// !LANGUAGE: +Coroutines
// SKIP_TXT
import kotlin.reflect.KSuspendFunction0
fun test(c: KSuspendFunction0<Unit>) {
<!ILLEGAL_SUSPEND_FUNCTION_CALL!>c<!>()
}
@@ -0,0 +1,6 @@
// !LANGUAGE: +Coroutines
// SKIP_TXT
suspend fun foo() {}
val ref = ::foo