Files
kotlin-fork/idea/jvm-debugger/jvm-debugger-test/testData/stepping/stepOver/stopInInlineCallInFieldInDelegate.kt
T
2019-10-08 19:13:55 +09:00

30 lines
503 B
Kotlin
Vendored

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
}