Inline get/setValues for local delegated properties
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package foo
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
inline operator fun getValue(t: Any?, p: KProperty<*>): String = p.name
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val OK: String by Delegate()
|
||||
return OK
|
||||
}
|
||||
Reference in New Issue
Block a user