Introduce KAnnotatedElement and val annotations: List<Annotation>
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
annotation(retention = AnnotationRetention.RUNTIME) class Simple(val value: String)
|
||||
|
||||
@Simple("OK")
|
||||
val foo: Int = 0
|
||||
|
||||
fun box(): String {
|
||||
return (::foo.annotations.single() as Simple).value
|
||||
}
|
||||
Reference in New Issue
Block a user