Debugger: breakpoints in library source files

This commit is contained in:
Natalia Ukhorskaya
2014-08-19 12:23:40 +04:00
parent 91f7f2479d
commit 453592edf4
21 changed files with 403 additions and 11 deletions
@@ -0,0 +1,24 @@
package customLibClassName
fun main(args: Array<String>) {
customLib.oneFunSameFileName.oneFunSameFileNameFun()
customLib.twoFunDifferentSignature.twoFunDifferentSignatureFun()
customLib.property.foo
customLib.breakpointOnLocalProperty.breakpointOnLocalPropertyFun()
}
// ADDITIONAL_BREAKPOINT: 1.kt:public fun oneFunSameFileNameFun(): Int {
// EXPRESSION: 1 + 1
// RESULT: 2: I
// ADDITIONAL_BREAKPOINT: 1.kt:public fun twoFunDifferentSignatureFun(): Int {
// EXPRESSION: 1 + 2
// RESULT: 3: I
// ADDITIONAL_BREAKPOINT: 1.kt:public val foo: Int =
// EXPRESSION: 1 + 3
// RESULT: 4: I
// ADDITIONAL_BREAKPOINT: 1.kt:public fun breakpointOnLocalPropertyFun(): Int {
// EXPRESSION: 1 + 4
// RESULT: 5: I
@@ -0,0 +1,15 @@
package stdlibDelegatedProperty
import kotlin.properties.Delegates
var prop: Int by Delegates.notNull()
fun main(args: Array<String>) {
prop = 3
val a = prop
}
// ADDITIONAL_BREAKPOINT: Delegation.kt:public override fun set(thisRef: Any?, desc: PropertyMetadata, value: T) {
// EXPRESSION: value.toString()
// RESULT: "3": Ljava/lang/String;
@@ -0,0 +1,14 @@
package stdlibRange
fun main(args: Array<String>) {
A().rangeTo(A()).contains(A())
}
class A: Comparable<A> {
override fun compareTo(other: A) = 0
}
// ADDITIONAL_BREAKPOINT: Ranges.kt:override fun contains(item: T): Boolean {
// EXPRESSION: start <= item
// RESULT: 1: Z
@@ -0,0 +1,11 @@
package stdlibSlice
fun main(args: Array<String>) {
val c: CharSequence = "CharSequence"
c.slice(0..1)
}
// ADDITIONAL_BREAKPOINT: StringsJVM.kt:CharSequence.slice(range: IntRange): CharSequence
// EXPRESSION: range.start
// RESULT: 0: I