KAPT: Always print parens on empty annotation parameters

Since JDK 17+ pretty-printer does not print parens on empty annotation
parameters, print them anyway. Otherwise, tests with annotations differ
on different JDKs.
 #KT-57389
This commit is contained in:
Ilmir Usmanov
2023-10-26 04:29:52 +02:00
committed by Space Team
parent 87aed4bf47
commit 4f7c96ae43
@@ -50,7 +50,11 @@ private class PrettyWithWorkarounds(
if (renderMetadata != null && tree.annotationType.toString() == METADATA_FQ_NAME.asString()) {
print(renderMetadata.invoke(this, tree))
}
super.visitAnnotation(tree)
print("@")
printExpr(tree.annotationType)
print("(")
printExprs(tree.args)
print(")")
}
}