Generate annotations from descriptors, not PSI
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package a
|
||||
|
||||
import java.lang.annotation.*
|
||||
|
||||
Retention(RetentionPolicy.RUNTIME)
|
||||
annotation class Ann
|
||||
|
||||
trait Tr {
|
||||
Ann
|
||||
fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class C : a.Tr
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val method = javaClass<C>().getDeclaredMethod("foo")
|
||||
val annotations = method.getDeclaredAnnotations().joinToString("\n")
|
||||
if (annotations != "@a.Ann()") {
|
||||
throw AssertionError(annotations)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user