Files
kotlin-fork/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.fir.kt.txt
T
2021-09-23 06:59:33 +00:00

53 lines
1010 B
Kotlin
Vendored

open annotation class A : Annotation {
constructor(x: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
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) {
#test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = <set-?>)
}