Implement debug-friendly Continuation.toString()
#KT-18986 Fixed
This commit is contained in:
committed by
Ilya Gorbunov
parent
4929f457ed
commit
e8597d706d
@@ -31,5 +31,5 @@ fun box(): String {
|
||||
result = A<String>().bar()
|
||||
}
|
||||
|
||||
return if (result == "Continuation @ A\$bar\$1") "OK" else "Fail: $result"
|
||||
return if (result == "Continuation at A.bar(coroutineToString.kt:16)") "OK" else "Fail: $result"
|
||||
}
|
||||
|
||||
+1
-2
@@ -64,8 +64,7 @@ internal abstract class BaseContinuationImpl(
|
||||
}
|
||||
|
||||
public override fun toString(): String {
|
||||
// todo: how continuation shall be rendered?
|
||||
return "Continuation @ ${this::class.java.name}"
|
||||
return "Continuation at ${getStackTraceElement() ?: this::class.java.name}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user