Test breakpoint is hit inside crossinline lambda called from anonymous object (KT-12612)
#KT-12612 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
23428c9544
commit
59a349a4ae
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at stopInLabdaOfCrossinlineCalledInAnonymous.kt:21
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stopInLabdaOfCrossinlineCalledInAnonymous.StopInLabdaOfCrossinlineCalledInAnonymousKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stopInLabdaOfCrossinlineCalledInAnonymous.kt:21
|
||||
stopInLabdaOfCrossinlineCalledInAnonymous.kt:22
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
package stopInLabdaOfCrossinlineCalledInAnonymous
|
||||
|
||||
// KT-12612
|
||||
|
||||
class C {}
|
||||
interface D {
|
||||
fun run()
|
||||
}
|
||||
|
||||
inline fun C.bar(crossinline lambda: () -> Unit) {
|
||||
object: D {
|
||||
override fun run() {
|
||||
lambda()
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
|
||||
fun foo(c: C) {
|
||||
c.bar {
|
||||
//Breakpoint!
|
||||
nop()
|
||||
nop()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo(C())
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
@@ -721,6 +721,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineInOtherFileWithLambdaArgumentDex.kt");
|
||||
doStepOverTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stopInLabdaOfCrossinlineCalledInAnonymous.kt")
|
||||
public void testStopInLabdaOfCrossinlineCalledInAnonymous() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLabdaOfCrossinlineCalledInAnonymous.kt");
|
||||
doStepOverTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/debugger/tinyApp/src/stepping/filters")
|
||||
|
||||
Reference in New Issue
Block a user