Adjust debugger to the new suspend function strategy
Now it's impossible to determine by descriptor if there is a state machine for function, but at the same time it doesn't really matter here since there is no LINENUMBERs in doResume of continuation implementations for named suspend functions #KT-17585 Fixed #KT-16603 Fixed
This commit is contained in:
@@ -3,23 +3,23 @@ package siSuspendFun
|
||||
import forTests.builder
|
||||
|
||||
private fun foo(): Int {
|
||||
return 42 // 8
|
||||
return 42 // 6
|
||||
}
|
||||
|
||||
// One line suspend wihtout doResume
|
||||
suspend fun fourth() = foo() // 7
|
||||
suspend fun fourth() = foo() // 5
|
||||
|
||||
// Multiline suspend without doResume
|
||||
suspend fun third() : Int? {
|
||||
return fourth() // 6
|
||||
return fourth() // 4
|
||||
}
|
||||
|
||||
// One line suspend with doResume
|
||||
suspend fun second(): Int = third()?.let { return it } ?: 0 // 4 (FIX IT!) 5
|
||||
suspend fun second(): Int = third()?.let { return it } ?: 0 // 3
|
||||
|
||||
// Multiline suspend with doResume
|
||||
suspend fun first(): Int { // 2 (FIX IT!)
|
||||
second() // 3
|
||||
suspend fun first(): Int { //
|
||||
second() // 2
|
||||
return 12
|
||||
}
|
||||
|
||||
@@ -31,4 +31,4 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_INTO: 7
|
||||
// STEP_INTO: 5
|
||||
|
||||
@@ -16,18 +16,18 @@ suspend fun third() : Int? {
|
||||
}
|
||||
|
||||
// One line suspend with doResume
|
||||
suspend fun second(): Int = third()?.let { return it } ?: 0 // 4 5 (FIX IT)
|
||||
suspend fun second(): Int = third()?.let { return it } ?: 0 // 4 (FIX IT)
|
||||
|
||||
// Multiline suspend with doResume
|
||||
suspend fun first(): Int {
|
||||
second() // 6
|
||||
second() // 5
|
||||
return 12
|
||||
} // 7 (FIX IT)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
builder {
|
||||
first() // 8
|
||||
first() // 6
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OUT: 7
|
||||
// STEP_OUT: 5
|
||||
|
||||
Reference in New Issue
Block a user