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
+1 -1
View File
@@ -1,5 +1,5 @@
// "Make bar suspend" "false"
// ERROR: Suspend functions are only allowed to be called from a coroutine or another suspend function
// ERROR: Suspend function 'foo' should be called only from a coroutine or another suspend function
suspend fun foo() {}
+1 -1
View File
@@ -1,6 +1,6 @@
// "Make bar suspend" "false"
// ACTION: Convert property initializer to getter
// ERROR: Suspend functions are only allowed to be called from a coroutine or another suspend function
// ERROR: Suspend function 'foo' should be called only from a coroutine or another suspend function
suspend fun foo() = 42
val x = <caret>foo()