Debugger: Add test for KT-14296
This commit is contained in:
+5
@@ -462,6 +462,11 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
|||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/inlineInObject.kt");
|
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/inlineInObject.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt14296.kt")
|
||||||
|
public void testKt14296() throws Exception {
|
||||||
|
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/kt14296.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt15652.kt")
|
@TestMetadata("kt15652.kt")
|
||||||
public void testKt15652() throws Exception {
|
public void testKt15652() throws Exception {
|
||||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/kt15652.kt");
|
runTest("idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/kt15652.kt");
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
//Breakpoint!
|
||||||
|
val list = listOf("a", "b", "c")
|
||||||
|
for (element in Some(list)) {
|
||||||
|
nonInline(element)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <T> nonInline(p: T): T = p
|
||||||
|
|
||||||
|
class Some<T>(val list: List<T>) {
|
||||||
|
operator fun iterator() = SomeIterator(list)
|
||||||
|
}
|
||||||
|
|
||||||
|
class SomeIterator<T>(list: List<T>) {
|
||||||
|
val iterator = list.iterator()
|
||||||
|
|
||||||
|
inline operator fun hasNext() : Boolean {
|
||||||
|
return iterator.hasNext()
|
||||||
|
}
|
||||||
|
|
||||||
|
inline operator fun next(): T {
|
||||||
|
return iterator.next()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// STEP_OVER: 10
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
LineBreakpoint created at kt14296.kt:5
|
||||||
|
Run Java
|
||||||
|
Connected to the target VM
|
||||||
|
kt14296.kt:5
|
||||||
|
kt14296.kt:6
|
||||||
|
kt14296.kt:7
|
||||||
|
kt14296.kt:6
|
||||||
|
kt14296.kt:7
|
||||||
|
kt14296.kt:6
|
||||||
|
kt14296.kt:7
|
||||||
|
kt14296.kt:6
|
||||||
|
kt14296.kt:9
|
||||||
|
Disconnected from the target VM
|
||||||
|
|
||||||
|
Process finished with exit code 0
|
||||||
Reference in New Issue
Block a user