Debugger doesn't step into 'for' body if there's inline function call in range expression (KT-13534)
#KT-13534 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
ef602be98e
commit
8b84b7158a
@@ -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.
|
||||
+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
|
||||
Reference in New Issue
Block a user