Add tests on smart step into lambda
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package funLiteral
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
f1() {
|
||||
f2()
|
||||
}
|
||||
}
|
||||
|
||||
fun f1(f: () -> Unit) { f() }
|
||||
fun f2() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 1
|
||||
@@ -0,0 +1,25 @@
|
||||
package severalFunLiterals
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val myClass = MyClass()
|
||||
//Breakpoint!
|
||||
myClass.f1 { test() }.f2 {
|
||||
test()
|
||||
}
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
fun f1(f1Param: () -> Unit): MyClass {
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun f2(f2Param: () -> Unit): MyClass {
|
||||
f2Param()
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 3
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package severalFunLiteralsInClass
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
MyClass().inClass()
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
fun f1(f1Param: () -> Unit): MyClass {
|
||||
f1Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun f2(f2Param: () -> Unit): MyClass {
|
||||
f2Param()
|
||||
return this
|
||||
}
|
||||
|
||||
fun inClass() {
|
||||
//Breakpoint!
|
||||
f1 { test() }.f2 {
|
||||
test()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {}
|
||||
|
||||
// SMART_STEP_INTO_BY_INDEX: 3
|
||||
Reference in New Issue
Block a user