Resolve expression in property delegate
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
trait A {
|
||||
val prop: Int
|
||||
}
|
||||
|
||||
class AImpl: A {
|
||||
override val prop by Delegate()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
AImpl().prop
|
||||
}
|
||||
|
||||
class Delegate {
|
||||
fun get(t: Any?, p: String): Int {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
return 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user