Box inline test for local delegated property
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): String = "OK"
|
||||
}
|
||||
|
||||
inline fun test(): String {
|
||||
val prop: String by Delegate()
|
||||
return prop
|
||||
}
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
return test()
|
||||
}
|
||||
Reference in New Issue
Block a user