Check breakpoints work in delegate initializer
Additional test after review
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
LineBreakpoint created at stopInInlineCallInFieldInDelegate.kt:11
|
||||||
|
!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! stopInInlineCallInFieldInDelegate.StopInInlineCallInFieldInDelegateKt
|
||||||
|
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
stopInInlineCallInFieldInDelegate.kt:11
|
||||||
|
stopInInlineCallInFieldInDelegate.kt:12
|
||||||
|
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||||
|
|
||||||
|
Process finished with exit code 0
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
package stopInInlineCallInFieldInDelegate
|
||||||
|
|
||||||
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
|
class A {
|
||||||
|
var value = 42
|
||||||
|
|
||||||
|
val b: String by getDelegate {
|
||||||
|
{
|
||||||
|
//Breakpoint!
|
||||||
|
foo(value)
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Suppress("NOTHING_TO_INLINE")
|
||||||
|
inline fun getDelegate(function: () -> Unit): Delegate {
|
||||||
|
function()
|
||||||
|
return Delegate()
|
||||||
|
}
|
||||||
|
|
||||||
|
class Delegate() {
|
||||||
|
operator fun getValue(a: A, property: KProperty<*>): String = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo(a: Any) {}
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
A().b
|
||||||
|
}
|
||||||
@@ -740,6 +740,12 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
doStepOverTest(fileName);
|
doStepOverTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("stopInInlineCallInFieldInDelegate.kt")
|
||||||
|
public void testStopInInlineCallInFieldInDelegate() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInDelegate.kt");
|
||||||
|
doStepOverTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("stopInInlineCallInFieldInLocalClass.kt")
|
@TestMetadata("stopInInlineCallInFieldInLocalClass.kt")
|
||||||
public void testStopInInlineCallInFieldInLocalClass() throws Exception {
|
public void testStopInInlineCallInFieldInLocalClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInLocalClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInLocalClass.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user