49 lines
970 B
Plaintext
Vendored
49 lines
970 B
Plaintext
Vendored
annotation class A : Annotation {
|
|
constructor(x: String) /* primary */
|
|
val x: String
|
|
field = x
|
|
get
|
|
|
|
}
|
|
|
|
class Cell {
|
|
constructor(value: Int) /* primary */ {
|
|
super/*Any*/()
|
|
/* <init>() */
|
|
|
|
}
|
|
|
|
var value: Int
|
|
field = value
|
|
get
|
|
set
|
|
|
|
operator fun getValue(thisRef: Any?, kProp: Any?): Int {
|
|
return <this>.<get-value>()
|
|
}
|
|
|
|
operator fun setValue(thisRef: Any?, kProp: Any?, newValue: Int) {
|
|
<this>.<set-value>(<set-?> = newValue)
|
|
}
|
|
|
|
}
|
|
|
|
val test1: Int /* by */
|
|
field = Cell(value = 1)
|
|
@A(x = "test1.get")
|
|
get(): Int {
|
|
return #test1$delegate.getValue(thisRef = null, kProp = ::test1)
|
|
}
|
|
|
|
var test2: Int /* by */
|
|
field = Cell(value = 2)
|
|
@A(x = "test2.get")
|
|
get(): Int {
|
|
return #test2$delegate.getValue(thisRef = null, kProp = ::test2)
|
|
}
|
|
@A(x = "test2.set")
|
|
set(@A(x = "test2.set.param") <set-?>: Int) {
|
|
return #test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = <set-?>)
|
|
}
|
|
|