Skip to content

Commit 31a8cd7

Browse files
author
Tobias Bordenca
committed
No empty parens for annotations
1 parent 4ecbb60 commit 31a8cd7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/src/scala/tasty/reflect/Printers.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,10 @@ trait Printers
15571557
val Annotation(ref, args) = annot
15581558
this += "@"
15591559
printTypeTree(ref)
1560-
inParens(printTrees(args, ", "))
1560+
if (args.isEmpty)
1561+
this
1562+
else
1563+
inParens(printTrees(args, ", "))
15611564
}
15621565

15631566
def printDefAnnotations(definition: Definition): Buffer = {

0 commit comments

Comments
 (0)