Debugger: Fix AbstractPositionManagerTest
MockReferenceType can't be used anymore because the new DebuggerClassNameProvider requires much more from it. The new SmartMockReferenceType implements methods such as nestedTypes() or allLineLocations() properly. Also, as PositionManager can return more than one class, we should check if any of the classes it returned matches the pattern.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package anonymousFunAsParamDefaultValue
|
||||
|
||||
fun foo(a: (String) -> String = fun(b: String): String {
|
||||
listOf("").map {
|
||||
//Breakpoint!
|
||||
val a = it.length
|
||||
}
|
||||
|
||||
//Breakpoint!
|
||||
return b
|
||||
}) {
|
||||
a("")
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
}
|
||||
|
||||
// RESUME: 2
|
||||
@@ -0,0 +1,28 @@
|
||||
package kt15823
|
||||
|
||||
object Some {
|
||||
val collection = mutableListOf<() -> Unit>()
|
||||
|
||||
inline fun inlineWithReified(crossinline lambda: () -> Unit) {
|
||||
collection.add({ lambda() })
|
||||
}
|
||||
|
||||
init {
|
||||
inlineWithReified {
|
||||
//Breakpoint!
|
||||
foo() // Will marked as (X), and never hit, but executes
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun magic() {
|
||||
collection.forEach { it.invoke() }
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Some.magic()
|
||||
}
|
||||
|
||||
// RESUME: 1
|
||||
@@ -0,0 +1,18 @@
|
||||
package kt17295
|
||||
|
||||
import java.lang.Thread.sleep
|
||||
import kotlin.concurrent.timer
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
timer("Repeating println", period=100) {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
sleep(2000)
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// RESUME: 1
|
||||
Reference in New Issue
Block a user