Skip to content

Commit f0fc5c1

Browse files
committed
Print ByNameTypeTrees in RefinedPrinter
Was missing before, ffell back to raw printing.
1 parent 6a3aab8 commit f0fc5c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
6363
}
6464

6565
override def toTextPrefix(tp: Type): Text = controlled {
66-
def isOmittable(sym: Symbol) =
66+
def isOmittable(sym: Symbol) =
6767
if (ctx.settings.verbose.value) false
6868
else if (homogenizedView) isEmptyPrefix(sym) // drop <root> and anonymous classes, but not scala, Predef.
6969
else isOmittablePrefix(sym)
@@ -351,6 +351,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
351351
toTextLocal(tpt) ~ " " ~ blockText(refines)
352352
case AppliedTypeTree(tpt, args) =>
353353
toTextLocal(tpt) ~ "[" ~ Text(args map argText, ", ") ~ "]"
354+
case ByNameTypeTree(tpt) =>
355+
"=> " ~ toTextLocal(tpt)
354356
case TypeBoundsTree(lo, hi) =>
355357
optText(lo)(" >: " ~ _) ~ optText(hi)(" <: " ~ _)
356358
case Bind(name, body) =>

0 commit comments

Comments
 (0)