Check breakpoints work in delegate initializer

Additional test after review
This commit is contained in:
Nikolay Krasko
2017-03-09 19:16:31 +03:00
parent e6ee933b27
commit 688802de51
3 changed files with 44 additions and 0 deletions
@@ -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
@@ -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);
}
@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")
public void testStopInInlineCallInFieldInLocalClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInLocalClass.kt");