Skip to content

Commit 5323e4d

Browse files
Tobias Bordencanicolasstucki
Tobias Bordenca
authored andcommitted
No empty parens for annotations
1 parent 36740bf commit 5323e4d

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
@@ -1576,7 +1576,10 @@ trait Printers
15761576
val Annotation(ref, args) = annot
15771577
this += "@"
15781578
printTypeTree(ref)
1579-
inParens(printTrees(args, ", "))
1579+
if (args.isEmpty)
1580+
this
1581+
else
1582+
inParens(printTrees(args, ", "))
15801583
}
15811584

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

0 commit comments

Comments
 (0)