Check breakpoints work in delegate initializer

Additional test after review
This commit is contained in:
Nikolay Krasko
2017-03-09 19:16:31 +03:00
parent e6ee933b27
commit 688802de51
3 changed files with 44 additions and 0 deletions
@@ -0,0 +1,30 @@
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
}