Generate bytecode for delegated properties
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class Delegate {
|
||||
fun get(t: F.A, p: String): Int = 1
|
||||
}
|
||||
|
||||
class F {
|
||||
val A.prop: Int by Delegate()
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
return A().prop
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return if(F().foo() == 1) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user