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:
committed by
Space Team
parent
87aed4bf47
commit
4f7c96ae43
+5
-1
@@ -50,7 +50,11 @@ private class PrettyWithWorkarounds(
|
|||||||
if (renderMetadata != null && tree.annotationType.toString() == METADATA_FQ_NAME.asString()) {
|
if (renderMetadata != null && tree.annotationType.toString() == METADATA_FQ_NAME.asString()) {
|
||||||
print(renderMetadata.invoke(this, tree))
|
print(renderMetadata.invoke(this, tree))
|
||||||
}
|
}
|
||||||
super.visitAnnotation(tree)
|
print("@")
|
||||||
|
printExpr(tree.annotationType)
|
||||||
|
print("(")
|
||||||
|
printExprs(tree.args)
|
||||||
|
print(")")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user