aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing/RefinedPrinter.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/printing/RefinedPrinter.scala')
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index dd8f04d92..c20598bb3 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -7,7 +7,7 @@ import Contexts.Context, Scopes.Scope, Denotations._, Annotations.Annotation
import StdNames.nme
import ast.{Trees, untpd}
import typer.Namer
-import typer.ProtoTypes.{SelectionProto, ViewProto, FunProto}
+import typer.ProtoTypes.{SelectionProto, ViewProto, FunProto, IgnoredProto}
import Trees._
import scala.annotation.switch
@@ -108,10 +108,6 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
}
return (toTextLocal(tycon) ~ "[" ~ Text(args map argText, ", ") ~ "]").close
}
- case tp: SelectionProto =>
- return toText(RefinedType(WildcardType, tp.name, tp.memberProto))
- case tp: ViewProto =>
- return toText(tp.argType) ~ " ?=>? " ~ toText(tp.resultType)
case tp: TypeRef =>
if ((tp.symbol is TypeParam | TypeArgument) && !ctx.phase.erasedTypes) {
return tp.info match {
@@ -121,8 +117,14 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
}
case ExprType(result) =>
return "=> " ~ toText(result)
+ case tp: SelectionProto =>
+ return toText(RefinedType(WildcardType, tp.name, tp.memberProto))
+ case tp: ViewProto =>
+ return toText(tp.argType) ~ " ?=>? " ~ toText(tp.resultType)
case FunProto(args, resultType, _) =>
return "funproto(" ~ toTextGlobal(args, ", ") ~ "):" ~ toText(resultType)
+ case tp: IgnoredProto =>
+ return "?"
case _ =>
}
super.toText(tp)