Move debugger test data to the new location
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package asIterableInFor
|
||||
|
||||
fun <T> nonInline(p: T): T = p
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val list = listOf("a", "b", "c")
|
||||
for (element in list.asIterable()) {
|
||||
nonInline(element)
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OVER: 4
|
||||
|
||||
// Tests that last line will be "9", no "11". See KT-13534.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at asIterableInFor.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
asIterableInFor.kt:7
|
||||
asIterableInFor.kt:8
|
||||
asIterableInFor.kt:9
|
||||
asIterableInFor.kt:8
|
||||
asIterableInFor.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package ifCapturedVariableKt9118
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
if (1 > 2) {
|
||||
println()
|
||||
}
|
||||
var isCompiledDataFromCache = true
|
||||
foo {
|
||||
isCompiledDataFromCache = false
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at ifCapturedVariableKt9118.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
ifCapturedVariableKt9118.kt:5
|
||||
ifCapturedVariableKt9118.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
package inlineCallInForRangeExpression
|
||||
|
||||
fun <T> nonInline(p: T) = p
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
nonInline(12)
|
||||
for (e in range()) {
|
||||
nonInline(e)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun range() = 1..2
|
||||
|
||||
// STEP_OVER: 6
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
LineBreakpoint created at inlineCallInForRangeExpression.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineCallInForRangeExpression.kt:7
|
||||
inlineCallInForRangeExpression.kt:8
|
||||
inlineCallInForRangeExpression.kt:9
|
||||
inlineCallInForRangeExpression.kt:8
|
||||
inlineCallInForRangeExpression.kt:9
|
||||
inlineCallInForRangeExpression.kt:8
|
||||
inlineCallInForRangeExpression.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package inlineFunctionSameLines
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
if (1 > 2) {
|
||||
val a = 1
|
||||
}
|
||||
else {
|
||||
val b = 2
|
||||
}
|
||||
|
||||
//Breakpoint!
|
||||
myFun(1)
|
||||
val a = 1
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at inlineFunctionSameLines.kt:12
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineFunctionSameLines.kt:12
|
||||
inlineFunctionSameLines.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package inlineInClassDex.other
|
||||
|
||||
class TestDexInlineInClass {
|
||||
inline fun inlineFun() {
|
||||
// Breakpoint 1
|
||||
some()
|
||||
some()
|
||||
}
|
||||
|
||||
fun some() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package inlineInClassDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
inlineInClassDex.other.TestDexInlineInClass().inlineFun()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: inlineInClassDex.Other.kt: Breakpoint 1
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at inlineInClassDex.Other.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInClassDex.Other.kt:6
|
||||
inlineInClassDex.Other.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package inlineInIfFalse
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val bar = ""
|
||||
//Breakpoint!
|
||||
if (inlineCall { true }) {
|
||||
foo()
|
||||
}
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
inline fun inlineCall(predicate: (String?) -> Boolean): Boolean {
|
||||
return false
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at inlineInIfFalse.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInIfFalse.kt:6
|
||||
inlineInIfFalse.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package inlineInIfFalseDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val bar = ""
|
||||
//Breakpoint!
|
||||
if (inlineCall { true }) {
|
||||
foo()
|
||||
}
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
inline fun inlineCall(predicate: (String?) -> Boolean): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
// STEP_OVER: 8
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at inlineInIfFalseDex.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInIfFalseDex.kt:6
|
||||
inlineInIfFalseDex.kt:9
|
||||
inlineInIfFalseDex.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package inlineInIfTrue
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val bar = ""
|
||||
//Breakpoint!
|
||||
if (inlineCall { true }) {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
inline fun inlineCall(predicate: (String?) -> Boolean): Boolean {
|
||||
return true
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at inlineInIfTrue.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInIfTrue.kt:6
|
||||
inlineInIfTrue.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package inlineInIfTrueDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val bar = ""
|
||||
//Breakpoint!
|
||||
if (inlineCall { true }) { // 1
|
||||
foo() // 2
|
||||
}
|
||||
} // 3
|
||||
|
||||
fun foo() {}
|
||||
|
||||
inline fun inlineCall(predicate: (String?) -> Boolean): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
// STEP_OVER: 6
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at inlineInIfTrueDex.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInIfTrueDex.kt:6
|
||||
inlineInIfTrueDex.kt:7
|
||||
inlineInIfTrueDex.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package inlineInObjectDex.other
|
||||
|
||||
object TestDexInlineInObject {
|
||||
inline fun inlineFun() {
|
||||
// Breakpoint 1
|
||||
some()
|
||||
some()
|
||||
}
|
||||
|
||||
fun some() {}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package inlineInObjectDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
inlineInObjectDex.other.TestDexInlineInObject.inlineFun()
|
||||
}
|
||||
|
||||
// ADDITIONAL_BREAKPOINT: inlineInObjectDex.Other.kt: Breakpoint 1
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at inlineInObjectDex.Other.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
inlineInObjectDex.Other.kt:6
|
||||
inlineInObjectDex.Other.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,10 @@
|
||||
package kt24343
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val list = listOf(1, 2)
|
||||
//Breakpoint!
|
||||
list.map { it + 1 }
|
||||
println()
|
||||
}
|
||||
|
||||
// STEP_OVER: 1
|
||||
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at kt24343.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt24343.kt:6
|
||||
kt24343.kt:6
|
||||
resuming kt24343.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package noParameterLambdaArgumentCallInInline
|
||||
|
||||
/*
|
||||
KT-6477 Breakpoints do not work in inline functions at line where inlined argument without arguments is invoked
|
||||
*/
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
lookAtMe {
|
||||
val c = "c"
|
||||
}
|
||||
}
|
||||
|
||||
inline fun lookAtMe(f: () -> Unit) {
|
||||
val a = "a"
|
||||
//Breakpoint!
|
||||
f()
|
||||
val b = "b"
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at noParameterLambdaArgumentCallInInline.kt:16
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
noParameterLambdaArgumentCallInInline.kt:16
|
||||
noParameterLambdaArgumentCallInInline.kt:17
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package noParameterLambdaArgumentCallInLambda
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint! (lambdaOrdinal = 1)
|
||||
foo { val a = 11 } // Breakpoint inside lambda argument
|
||||
}
|
||||
|
||||
inline fun foo(s: () -> Unit) {
|
||||
val x = 22
|
||||
s()
|
||||
val y = 33
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at noParameterLambdaArgumentCallInLambda.kt:5 lambdaOrdinal = 1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
noParameterLambdaArgumentCallInLambda.kt:5
|
||||
noParameterLambdaArgumentCallInLambda.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package soBreakpointWithInline
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
12.inlineExt().normalExt() // Try to step over this line. Debugger will stop on the same line twice
|
||||
foo()
|
||||
}
|
||||
|
||||
inline fun Any.inlineExt(): Any = this
|
||||
fun Any.normalExt(): Any = this
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at soBreakpointWithInline.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soBreakpointWithInline.kt:7
|
||||
soBreakpointWithInline.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package soBreakpointWithOrdinalOnInlineCallsInOneLine
|
||||
|
||||
fun test(i: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val listOf = listOf(1)
|
||||
//Breakpoint! (lambdaOrdinal = -1)
|
||||
val testSome = listOf.filterNot({test(it)}).get(0)
|
||||
foo()
|
||||
}
|
||||
|
||||
|
||||
// STEP_OVER: 4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soBreakpointWithOrdinalOnInlineCallsInOneLine.kt:12 lambdaOrdinal = -1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soBreakpointWithOrdinalOnInlineCallsInOneLine.kt:12
|
||||
soBreakpointWithOrdinalOnInlineCallsInOneLine.kt:13
|
||||
soBreakpointWithOrdinalOnInlineCallsInOneLine.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
package soInlineAnonymousFunctionArgument
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val b = 1 // 1
|
||||
|
||||
foo( // 2
|
||||
fun (){ test(1) }
|
||||
)
|
||||
|
||||
foo(fun (){ test(1) }) // 3
|
||||
} // 4
|
||||
|
||||
inline fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun test(i: Int) = 1
|
||||
|
||||
// STEP_OVER: 6
|
||||
idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/soInlineAnonymousFunctionArgument.out
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineAnonymousFunctionArgument.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineAnonymousFunctionArgument.kt:5
|
||||
soInlineAnonymousFunctionArgument.kt:7
|
||||
soInlineAnonymousFunctionArgument.kt:11
|
||||
soInlineAnonymousFunctionArgument.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package soInlineAnonymousFunctionArgumentDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val b = 1 // 1
|
||||
|
||||
foo( // 2
|
||||
fun (){ test(1) } //
|
||||
)
|
||||
|
||||
foo(fun (){ test(1) }) // 3
|
||||
} // 4
|
||||
|
||||
inline fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun test(i: Int) = 1
|
||||
|
||||
// STEP_OVER: 10
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineAnonymousFunctionArgumentDex.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineAnonymousFunctionArgumentDex.kt:5
|
||||
soInlineAnonymousFunctionArgumentDex.kt:7
|
||||
soInlineAnonymousFunctionArgumentDex.kt:11
|
||||
soInlineAnonymousFunctionArgumentDex.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soInlineCallInLastStatementInInline
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar()
|
||||
}
|
||||
|
||||
inline fun bar() {
|
||||
//Breakpoint!
|
||||
val a = 1
|
||||
foo { 42 }
|
||||
}
|
||||
|
||||
inline fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
// STEP_OVER: 3
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineCallInLastStatementInInline.kt:9
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallInLastStatementInInline.kt:9
|
||||
soInlineCallInLastStatementInInline.kt:10
|
||||
soInlineCallInLastStatementInInline.kt:11
|
||||
soInlineCallInLastStatementInInline.kt:5
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package soInlineCallInLastStatementInInlineDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar()
|
||||
nop() // 3
|
||||
} // 4
|
||||
|
||||
inline fun bar() {
|
||||
//Breakpoint!
|
||||
nop() // 1
|
||||
foo { 42 } // 2
|
||||
}
|
||||
|
||||
inline fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 8
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soInlineCallInLastStatementInInlineDex.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallInLastStatementInInlineDex.kt:10
|
||||
soInlineCallInLastStatementInInlineDex.kt:11
|
||||
soInlineCallInLastStatementInInlineDex.kt:12
|
||||
soInlineCallInLastStatementInInlineDex.kt:5
|
||||
soInlineCallInLastStatementInInlineDex.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package soInlineCallInLastStatementInInlineFunctionArgument
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar {
|
||||
nop()
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
}
|
||||
|
||||
inline fun foo() {
|
||||
nop()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 3
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soInlineCallInLastStatementInInlineFunctionArgument.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallInLastStatementInInlineFunctionArgument.kt:7
|
||||
soInlineCallInLastStatementInInlineFunctionArgument.kt:8
|
||||
soInlineCallInLastStatementInInlineFunctionArgument.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package soInlineCallInLastStatementInInlineFunctionArgumentDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar {
|
||||
nop()
|
||||
//Breakpoint!
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
}
|
||||
|
||||
inline fun foo() {
|
||||
nop()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 5
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soInlineCallInLastStatementInInlineFunctionArgumentDex.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallInLastStatementInInlineFunctionArgumentDex.kt:7
|
||||
soInlineCallInLastStatementInInlineFunctionArgumentDex.kt:8
|
||||
soInlineCallInLastStatementInInlineFunctionArgumentDex.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package soInlineCallInLastStatementInInlineInInline
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar()
|
||||
val i = 45
|
||||
}
|
||||
|
||||
inline fun bar() {
|
||||
val a = 1
|
||||
foo { 42 }
|
||||
}
|
||||
|
||||
inline fun foo(f: () -> Unit) {
|
||||
//Breakpoint!
|
||||
f()
|
||||
}
|
||||
|
||||
// STEP_OVER: 4
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soInlineCallInLastStatementInInlineInInline.kt:15
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallInLastStatementInInlineInInline.kt:15
|
||||
soInlineCallInLastStatementInInlineInInline.kt:16
|
||||
soInlineCallInLastStatementInInlineInInline.kt:11
|
||||
soInlineCallInLastStatementInInlineInInline.kt:5
|
||||
soInlineCallInLastStatementInInlineInInline.kt:6
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package soInlineCallsInOneLine
|
||||
|
||||
fun test(i: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val listOf = listOf(1)
|
||||
val testSome = listOf.filterNot(::test)
|
||||
foo()
|
||||
}
|
||||
|
||||
|
||||
// STEP_OVER: 3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineCallsInOneLine.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineCallsInOneLine.kt:11
|
||||
soInlineCallsInOneLine.kt:12
|
||||
soInlineCallsInOneLine.kt:13
|
||||
soInlineCallsInOneLine.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar {
|
||||
println("")
|
||||
}
|
||||
}
|
||||
|
||||
inline fun bar(f2: () -> Unit) {
|
||||
//Breakpoint! (lambdaOrdinal = -1)
|
||||
foo({ 42 },
|
||||
f2)
|
||||
}
|
||||
|
||||
inline fun foo(f1: () -> Unit, f2: () -> Unit) {
|
||||
f1()
|
||||
f2()
|
||||
}
|
||||
|
||||
// STEP_OVER: 5
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:11 lambdaOrdinal = -1
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:11
|
||||
soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:13
|
||||
soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package soInlineFunDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = 1
|
||||
|
||||
//Breakpoint!
|
||||
simple() // 1
|
||||
|
||||
withParam(1 + a) // 2
|
||||
|
||||
withLambda { "hi" } // 3
|
||||
} // 4
|
||||
|
||||
inline fun simple() {
|
||||
foo()
|
||||
}
|
||||
|
||||
inline fun withParam(i: Int) {
|
||||
}
|
||||
|
||||
inline fun withLambda(a: () -> Unit) {
|
||||
a()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// STEP_OVER: 6
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunDex.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunDex.kt:7
|
||||
soInlineFunDex.kt:9
|
||||
soInlineFunDex.kt:11
|
||||
soInlineFunDex.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package soInlineFunOnOneLineFor
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val list = listOf(1, 2, 3)
|
||||
|
||||
list.any1 { it > 2 }
|
||||
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
inline fun <T> Iterable<T>.any1(predicate: (T) -> Boolean): Boolean {
|
||||
//Breakpoint!
|
||||
for (element in this) if (predicate(element)) return true
|
||||
return false
|
||||
}
|
||||
|
||||
// STEP_OVER: 3
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunOnOneLineFor.kt:17
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunOnOneLineFor.kt:17
|
||||
soInlineFunOnOneLineFor.kt:18
|
||||
soInlineFunOnOneLineFor.kt:8
|
||||
soInlineFunOnOneLineFor.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
package soInlineFunOnOneLineForDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val list = listOf(1, 2, 3)
|
||||
|
||||
list.any1 { it > 2 }
|
||||
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
inline fun <T> Iterable<T>.any1(predicate: (T) -> Boolean): Boolean {
|
||||
//Breakpoint!
|
||||
for (element in this) if (predicate(element)) return true
|
||||
return false
|
||||
}
|
||||
|
||||
// STEP_OVER: 3
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunOnOneLineForDex.kt:17
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunOnOneLineForDex.kt:17
|
||||
soInlineFunOnOneLineForDex.kt:18
|
||||
soInlineFunOnOneLineForDex.kt:8
|
||||
soInlineFunOnOneLineForDex.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package soInlineFunWithFor
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
|
||||
val r = any1 { it > 2 }
|
||||
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
inline fun any1(predicate: (Int) -> Boolean) {
|
||||
for (i in 1..2) {
|
||||
if (predicate(i)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OVER: 5
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunWithFor.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunWithFor.kt:5
|
||||
soInlineFunWithFor.kt:7
|
||||
soInlineFunWithFor.kt:9
|
||||
soInlineFunWithFor.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soInlineFunWithLastStatementMultilineArgumentCall
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
var k = 444
|
||||
bar {
|
||||
val b = 1
|
||||
}
|
||||
|
||||
k++
|
||||
}
|
||||
|
||||
inline fun bar(f: (Int) -> Unit) {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soInlineFunWithLastStatementMultilineArgumentCall.kt:14
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunWithLastStatementMultilineArgumentCall.kt:14
|
||||
soInlineFunWithLastStatementMultilineArgumentCall.kt:15
|
||||
soInlineFunWithLastStatementMultilineArgumentCall.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package soInlineFunWithLastStatementOneLineArgumentCall
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
var k = 444
|
||||
bar { val b = 1 }
|
||||
k++
|
||||
}
|
||||
|
||||
inline fun bar(f: (Int) -> Unit) {
|
||||
//Breakpoint!
|
||||
f(1)
|
||||
}
|
||||
|
||||
// STEP_OVER: 4
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineFunWithLastStatementOneLineArgumentCall.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineFunWithLastStatementOneLineArgumentCall.kt:11
|
||||
soInlineFunWithLastStatementOneLineArgumentCall.kt:12
|
||||
soInlineFunWithLastStatementOneLineArgumentCall.kt:6
|
||||
soInlineFunWithLastStatementOneLineArgumentCall.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
package soInlineIfConditionLambdaFalse
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
inline fun bar(f: (Int) -> Boolean) {
|
||||
//Breakpoint!
|
||||
if (f(42)) {
|
||||
foo()
|
||||
}
|
||||
else {
|
||||
foo()
|
||||
}
|
||||
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// STEP_OVER: 4
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soInlineIfConditionLambdaFalse.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineIfConditionLambdaFalse.kt:11
|
||||
soInlineIfConditionLambdaFalse.kt:15
|
||||
soInlineIfConditionLambdaFalse.kt:18
|
||||
soInlineIfConditionLambdaFalse.kt:19
|
||||
soInlineIfConditionLambdaFalse.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
package soInlineIfConditionLambdaTrue
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar {
|
||||
true
|
||||
}
|
||||
} // 4
|
||||
|
||||
inline fun bar(f: (Int) -> Boolean) {
|
||||
//Breakpoint!
|
||||
if (f(42)) { // 1
|
||||
foo() // 2
|
||||
}
|
||||
else {
|
||||
foo()
|
||||
}
|
||||
|
||||
foo() // 3
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// STEP_OVER: 4
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soInlineIfConditionLambdaTrue.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineIfConditionLambdaTrue.kt:11
|
||||
soInlineIfConditionLambdaTrue.kt:12
|
||||
soInlineIfConditionLambdaTrue.kt:18
|
||||
soInlineIfConditionLambdaTrue.kt:19
|
||||
soInlineIfConditionLambdaTrue.kt:7
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package soInlineIterableFunDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val list = listOf(1, 2, 3)
|
||||
|
||||
list.any1 { it > 2 }
|
||||
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
|
||||
inline fun <T> Iterable<T>.any1(predicate: (T) -> Boolean): Boolean {
|
||||
for (element in this) if (predicate(element)) return true
|
||||
return false
|
||||
}
|
||||
|
||||
// STEP_OVER: 5
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at soInlineIterableFunDex.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineIterableFunDex.kt:5
|
||||
soInlineIterableFunDex.kt:7
|
||||
soInlineIterableFunDex.kt:9
|
||||
soInlineIterableFunDex.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package soInlineLibFunDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
var i = 1
|
||||
|
||||
listOf(1, 2, 3).any { it > 2 } // Step over goes into 'any' (regression)
|
||||
|
||||
if (listOf(1, 2, 3).any { it > 2 }) { // Step over goes into 'any'
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
inline fun test(a: () -> Unit) {
|
||||
a()
|
||||
}
|
||||
|
||||
// STEP_OVER: 7
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soInlineLibFunDex.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineLibFunDex.kt:5
|
||||
soInlineLibFunDex.kt:7
|
||||
soInlineLibFunDex.kt:9
|
||||
soInlineLibFunDex.kt:10
|
||||
soInlineLibFunDex.kt:12
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package soInlineOperatorIterator
|
||||
|
||||
// TODO: Test with current bad behaviour of KT-14296
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
val list = listOf("a", "b", "c")
|
||||
for (element in Some(list)) { // No inlining visible on this string
|
||||
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: 15
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
LineBreakpoint created at soInlineOperatorIterator.kt:7
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineOperatorIterator.kt:7
|
||||
soInlineOperatorIterator.kt:8
|
||||
soInlineOperatorIterator.kt:23
|
||||
soInlineOperatorIterator.kt:27
|
||||
soInlineOperatorIterator.kt:9
|
||||
soInlineOperatorIterator.kt:8
|
||||
soInlineOperatorIterator.kt:23
|
||||
soInlineOperatorIterator.kt:27
|
||||
soInlineOperatorIterator.kt:9
|
||||
soInlineOperatorIterator.kt:8
|
||||
soInlineOperatorIterator.kt:23
|
||||
soInlineOperatorIterator.kt:27
|
||||
soInlineOperatorIterator.kt:9
|
||||
soInlineOperatorIterator.kt:8
|
||||
soInlineOperatorIterator.kt:23
|
||||
soInlineOperatorIterator.kt:11
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soInlineUnitFunDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
process()
|
||||
}
|
||||
|
||||
fun process(): String {
|
||||
simple()
|
||||
//Breakpoint!
|
||||
return "Constant" // 1
|
||||
}
|
||||
|
||||
inline fun simple() {
|
||||
inner()
|
||||
}
|
||||
|
||||
fun inner() {}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at soInlineUnitFunDex.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineUnitFunDex.kt:10
|
||||
soInlineUnitFunDex.kt:4
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package soInlineWhileCondition
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
var i = 1 // 1
|
||||
// inline in while condition (true)
|
||||
while (id { i < 2 }) { // 2 4
|
||||
i++ // 3
|
||||
}
|
||||
|
||||
// inline in while condition (false)
|
||||
while (id { false }) { // 5
|
||||
bar()
|
||||
}
|
||||
} // 6
|
||||
|
||||
inline fun id(f: () -> Boolean): Boolean {
|
||||
return f()
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
|
||||
// STEP_OVER: 6
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
LineBreakpoint created at soInlineWhileCondition.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineWhileCondition.kt:5
|
||||
soInlineWhileCondition.kt:7
|
||||
soInlineWhileCondition.kt:8
|
||||
soInlineWhileCondition.kt:7
|
||||
soInlineWhileCondition.kt:12
|
||||
soInlineWhileCondition.kt:15
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
package soInlineWhileConditionDex
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
var i = 1
|
||||
// inline in while condition (true)
|
||||
while (id { i < 2 }) {
|
||||
i++
|
||||
}
|
||||
|
||||
// inline in while condition (false)
|
||||
while (id { false }) {
|
||||
bar()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun id(f: () -> Boolean): Boolean {
|
||||
return f()
|
||||
}
|
||||
|
||||
fun bar() {}
|
||||
|
||||
// STEP_OVER: 12
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
LineBreakpoint created at soInlineWhileConditionDex.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soInlineWhileConditionDex.kt:5
|
||||
soInlineWhileConditionDex.kt:7
|
||||
soInlineWhileConditionDex.kt:8
|
||||
soInlineWhileConditionDex.kt:7
|
||||
soInlineWhileConditionDex.kt:12
|
||||
soInlineWhileConditionDex.kt:15
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soLastStatementInInlineFunctionArgumenBeforeOtherArgument
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar({
|
||||
//Breakpoint!
|
||||
nop()
|
||||
}, 12)
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit, a: Any) {
|
||||
nop()
|
||||
f()
|
||||
} // <-- Ideally this line should not be visited
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt:6
|
||||
soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt:7
|
||||
soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soLastStatementInInlineFunctionArgumentAsAnonymous
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar(fun() {
|
||||
//Breakpoint!
|
||||
nop()
|
||||
})
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumentAsAnonymous.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymous.kt:6
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymous.kt:7
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymous.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar(fun() {
|
||||
//Breakpoint!
|
||||
nop()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt:6
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt:7
|
||||
soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soLastStatementInInlineFunctionArgumentInGetOperator
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
12[{
|
||||
//Breakpoint!
|
||||
nop()
|
||||
}]
|
||||
}
|
||||
|
||||
inline operator fun Int.get(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
} // <-- Ideally this line should not be visited
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumentInGetOperator.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumentInGetOperator.kt:6
|
||||
soLastStatementInInlineFunctionArgumentInGetOperator.kt:7
|
||||
soLastStatementInInlineFunctionArgumentInGetOperator.kt:13
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package soLastStatementInInlineFunctionArgumentInNonInlineCall
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
nonInline { bar {
|
||||
//Breakpoint!
|
||||
nop()
|
||||
} }
|
||||
}
|
||||
|
||||
fun nonInline(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
} // <-- Ideally this line should not be visited
|
||||
|
||||
fun nop() {}
|
||||
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumentInNonInlineCall.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumentInNonInlineCall.kt:6
|
||||
soLastStatementInInlineFunctionArgumentInNonInlineCall.kt:7
|
||||
soLastStatementInInlineFunctionArgumentInNonInlineCall.kt:17
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package soLastStatementInInlineFunctionArgumentInPars
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
bar({
|
||||
//Breakpoint!
|
||||
nop()
|
||||
})
|
||||
}
|
||||
|
||||
inline fun bar(f: () -> Unit) {
|
||||
nop()
|
||||
f()
|
||||
}
|
||||
|
||||
fun nop() {}
|
||||
|
||||
// STEP_OVER: 2
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soLastStatementInInlineFunctionArgumentInPars.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soLastStatementInInlineFunctionArgumentInPars.kt:6
|
||||
soLastStatementInInlineFunctionArgumentInPars.kt:7
|
||||
soLastStatementInInlineFunctionArgumentInPars.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+21
@@ -0,0 +1,21 @@
|
||||
package soNonSuspendableSuspendCall
|
||||
|
||||
import forTests.builder
|
||||
|
||||
private fun foo() {}
|
||||
|
||||
suspend fun second() {
|
||||
}
|
||||
|
||||
suspend fun first(): Int {
|
||||
second()
|
||||
return 12
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
builder {
|
||||
//Breakpoint!
|
||||
first()
|
||||
foo()
|
||||
}
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at soNonSuspendableSuspendCall.kt:18
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soNonSuspendableSuspendCall.kt:18
|
||||
soNonSuspendableSuspendCall.kt:19
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
package soReifiedInlineIfConditionFalse
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// Reified function call in if condition
|
||||
//Breakpoint!
|
||||
if (reified(11) != 11) { // 1
|
||||
val a = 22
|
||||
}
|
||||
} // 2
|
||||
|
||||
inline fun <reified T> reified(f: T): T {
|
||||
val a = 33
|
||||
return f
|
||||
}
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at soReifiedInlineIfConditionFalse.kt:6
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soReifiedInlineIfConditionFalse.kt:6
|
||||
soReifiedInlineIfConditionFalse.kt:9
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
package soSimpleInlineIfCondition
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
if (foo {
|
||||
test(2)
|
||||
}) {
|
||||
bar()
|
||||
}
|
||||
|
||||
bar()
|
||||
}
|
||||
|
||||
inline fun foo(f: () -> Boolean): Boolean = f()
|
||||
|
||||
fun test(i: Int): Boolean = true
|
||||
|
||||
fun bar() {}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at soSimpleInlineIfCondition.kt:5
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soSimpleInlineIfCondition.kt:5
|
||||
soSimpleInlineIfCondition.kt:8
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
package soSuspendableCallInEndOfFun
|
||||
|
||||
import forTests.WaitFinish
|
||||
import forTests.builder
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
val waiter = WaitFinish()
|
||||
val suspendWaiter = WaitFinish()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
builder {
|
||||
inFun()
|
||||
}
|
||||
|
||||
suspendWaiter.finish()
|
||||
|
||||
foo("Main end")
|
||||
waiter.waitEnd()
|
||||
}
|
||||
|
||||
suspend fun inFun() {
|
||||
foo("Start")
|
||||
//Breakpoint!
|
||||
run()
|
||||
}
|
||||
|
||||
suspend fun run() {
|
||||
suspendCoroutine { cont: Continuation<Unit> ->
|
||||
Thread {
|
||||
suspendWaiter.waitEnd()
|
||||
cont.resume(Unit)
|
||||
waiter.finish()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OVER: 4
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at soSuspendableCallInEndOfFun.kt:27
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soSuspendableCallInEndOfFun.kt:27
|
||||
soSuspendableCallInEndOfFun.kt:15
|
||||
soSuspendableCallInEndOfFun.kt:14
|
||||
soSuspendableCallInEndOfFun.kt:16
|
||||
soSuspendableCallInEndOfFun.kt:35
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
package soSuspendableCallInEndOfLambda
|
||||
|
||||
import forTests.builder
|
||||
import forTests.WaitFinish
|
||||
import kotlin.coroutines.Continuation
|
||||
import kotlin.coroutines.*
|
||||
|
||||
private fun foo(a: Any) {}
|
||||
|
||||
val waiter = WaitFinish()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
builder {
|
||||
foo("Start")
|
||||
//Breakpoint!
|
||||
run()
|
||||
}
|
||||
|
||||
foo("Main end")
|
||||
waiter.waitEnd()
|
||||
}
|
||||
|
||||
suspend fun run() {
|
||||
suspendCoroutine { cont: Continuation<Unit> ->
|
||||
Thread {
|
||||
Thread.sleep(10)
|
||||
cont.resume(Unit)
|
||||
waiter.finish()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_OVER: 2
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
LineBreakpoint created at soSuspendableCallInEndOfLambda.kt:16
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
soSuspendableCallInEndOfLambda.kt:16
|
||||
soSuspendableCallInEndOfLambda.kt:13
|
||||
soSuspendableCallInEndOfLambda.kt:17
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user