Files
kotlin-fork/compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt
T
Mads Ager 03fb49bb38 [JVM_IR] Improve debugging behavior of inline functions
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.

  - Improved line numbers in the default handler itself for better
    stepping when inlined.

  - Improved source information on default arguments

  - Improved test coverage of stepping behavior in old and IR backends.

Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
2020-04-07 16:52:45 +02:00

24 lines
519 B
Kotlin
Vendored

// Enable for dexing once we have a D8 version with a fix for
// https://issuetracker.google.com/148661132
// IGNORE_DEXING
// FILE: 1.kt
// SKIP_INLINE_CHECK_IN: inlineFun$default
package test
open class A(val value: String)
class B(value: String): A(value)
inline fun <T : A> inlineFun(capturedParam: T, lambda: () -> T = { capturedParam }): T {
return lambda()
}
// FILE: 2.kt
// CHECK_CONTAINS_NO_CALLS: box
import test.*
fun box(): String {
return inlineFun(B("O")).value + inlineFun(A("K")).value
}