Tolerate generic annotations

This causes them to render properly in PrintAst output due to `getAnnotationElement` working as expected, and will hide the fact that they are represented by raw types in bytecode.
This commit is contained in:
Chris Smowton
2022-11-30 13:01:52 +00:00
parent f6888c727f
commit 7a7c08b185
2 changed files with 17 additions and 17 deletions

View File

@@ -37,7 +37,7 @@ class Annotation extends @annotation, Expr {
}
/** Gets the annotation type declaration for this annotation. */
override AnnotationType getType() { result = Expr.super.getType() }
override AnnotationType getType() { result = Expr.super.getType().(AnnotationType).getSourceDeclaration() }
/** Gets the annotation element with the specified `name`. */
AnnotationElement getAnnotationElement(string name) {