Debugger: Prohibit 'suspend fun' calls in evaluated expressions

Currently, it's impossible to call suspend functions in evaluated code fragments (see KT-31701).
This commit officially prohibits such calls, so users will see a semi-friendly error message.
This commit is contained in:
Yan Zhulanow
2019-07-09 22:24:20 +09:00
parent 910133dbfb
commit d6487e89ad
4 changed files with 35 additions and 0 deletions
@@ -0,0 +1,11 @@
package suspendCalls
suspend fun main() {
//Breakpoint!
foo()
}
suspend fun foo(): Int = 42
// EXPRESSION: foo()
// RESULT: Evaluation of 'suspend' calls is not supported
@@ -0,0 +1,7 @@
LineBreakpoint created at suspendCalls.kt:5
Run Java
Connected to the target VM
suspendCalls.kt:5
Disconnected from the target VM
Process finished with exit code 0