Introduce KAnnotatedElement and val annotations: List<Annotation>
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
annotation class Get
|
||||
annotation class Set
|
||||
annotation class SetParam
|
||||
|
||||
var foo: String
|
||||
@Get get() = ""
|
||||
@Set set(@SetParam value) {}
|
||||
|
||||
fun box(): String {
|
||||
assert(::foo.getter.annotations.single() is Get)
|
||||
assert(::foo.setter.annotations.single() is Set)
|
||||
assert(::foo.setter.parameters.single().annotations.single() is SetParam)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user