Add callee name to diagnostic about illegal suspension call

#KT-15938 Fixed
This commit is contained in:
Denis Zharkov
2017-02-07 14:50:43 +03:00
parent a74fffeac8
commit 4ee818addf
8 changed files with 20 additions and 5 deletions
+7
View File
@@ -0,0 +1,7 @@
// !DIAGNOSTICS_NUMBER: 1
// !DIAGNOSTICS: ILLEGAL_SUSPEND_FUNCTION_CALL
suspend fun foo() {}
fun noSuspend() {
foo()
}
@@ -0,0 +1,2 @@
<!-- illegalSuspendCall1 -->
Suspend function 'foo' should be called only from a coroutine or another suspend function