You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit fixes multiple issues in annotation parsing for java code
1) When getting annotation names, it was always using the index instead
of the name. I changed it to default to name and only use index if
name is not provided.
2) Array values in annotations were repoted as a list of pairs instead
of 1 key and multiple values, fixed.
3) When the annotation value is a type, it was not returning a KSType
but instead returning a PsiType, fixed.
4) When the annotation value is another annotation, it was not returning
a KSAnnotation, fixed.
5) For expressions resolving to literals, it was returning the PsiLiteral
instead of the value of it.
6) TypeReferences (relevant in enum values) were not being resolved.
Updated/added tests for all cases above.
The enum fix for java source is not great right now because seems like
evaluator does not resolve it, hence I implemented a manual resolution that
is very similar to the implementation in KSAnnotationImpl.
0 commit comments