diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/printing')
-rw-r--r-- | compiler/src/dotty/tools/dotc/printing/Formatting.scala | 5 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/printing/Formatting.scala b/compiler/src/dotty/tools/dotc/printing/Formatting.scala index b321d3736..05f1af9d7 100644 --- a/compiler/src/dotty/tools/dotc/printing/Formatting.scala +++ b/compiler/src/dotty/tools/dotc/printing/Formatting.scala @@ -96,7 +96,10 @@ object Formatting { case tpe: Type => tpe.exists && !tpe.isErroneous case sym: Symbol if sym.isCompleted => - sym.info != ErrorType && sym.info != TypeAlias(ErrorType) && sym.info.exists + sym.info match { + case _: ErrorType | TypeAlias(_: ErrorType) | NoType => false + case _ => true + } case _ => true } diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index 15c382bb0..61f23c214 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -154,7 +154,7 @@ class PlainPrinter(_ctx: Context) extends Printer { changePrec(AndPrec) { toText(tp1) ~ " & " ~ toText(tp2) } case OrType(tp1, tp2) => changePrec(OrPrec) { toText(tp1) ~ " | " ~ toText(tp2) } - case ErrorType => + case _: ErrorType => "<error>" case tp: WildcardType => if (tp.optBounds.exists) "(?" ~ toTextRHS(tp.bounds) ~ ")" else "?" |