File tree 1 file changed +5
-3
lines changed
library/src/scala/tasty/reflect 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -713,8 +713,10 @@ trait Printers
713
713
if (vdef.symbol.flags.is(Flags .Mutable )) this += highlightKeyword(" var " , color)
714
714
else this += highlightKeyword(" val " , color)
715
715
716
- this += highlightValDef(name, color) += " : "
717
- printTypeTree(tpt)
716
+ if (tpt.pos.exists && tpt.pos.start != tpt.pos.end) {
717
+ this += highlightValDef(name, color) += " : "
718
+ printTypeTree(tpt)
719
+ }
718
720
rhs match {
719
721
case Some (tree) =>
720
722
this += " = "
@@ -830,7 +832,7 @@ trait Printers
830
832
// type bounds already printed in `fn`
831
833
this
832
834
case _ =>
833
- inSquare(printTypeOrBoundsTrees(args.filter(_ .pos.exists), " , " ))
835
+ inSquare(printTypeOrBoundsTrees(args.filter(arg => arg .pos.exists && arg.pos.start != arg.pos.end ), " , " ))
834
836
}
835
837
836
838
case Term .Super (qual, idOpt) =>
You can’t perform that action at this time.
0 commit comments