aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing/PlainPrinter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-10-24 13:28:55 +0200
committerMartin Odersky <odersky@gmail.com>2013-10-24 13:28:55 +0200
commitde336bccbbd5671f97e7889b5260e963c8317b1d (patch)
tree4d5ffd493777955cfc414442b78d1d8d027b577b /src/dotty/tools/dotc/printing/PlainPrinter.scala
parent3f5af18620f5274fefe9683542fd4f02ec099dfd (diff)
downloaddotty-de336bccbbd5671f97e7889b5260e963c8317b1d.tar.gz
dotty-de336bccbbd5671f97e7889b5260e963c8317b1d.tar.bz2
dotty-de336bccbbd5671f97e7889b5260e963c8317b1d.zip
Change in how type variables are printed.
Uninstantiated type variables are now marked with ? instead of ''. The marking with '' is ambiguous becuase it could also mean an instantiated type variable that refers to another instantiated type variable.
Diffstat (limited to 'src/dotty/tools/dotc/printing/PlainPrinter.scala')
-rw-r--r--src/dotty/tools/dotc/printing/PlainPrinter.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala
index f8c533b86..5a01964d6 100644
--- a/src/dotty/tools/dotc/printing/PlainPrinter.scala
+++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala
@@ -141,7 +141,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
case AnnotatedType(annot, tpe) =>
toTextLocal(tpe) ~ " " ~ toText(annot)
case tp: TypeVar =>
- val suffix = if (tp.isInstantiated) "'" else "''"
+ val suffix = if (tp.isInstantiated) "'" else "?"
toTextLocal(tp.underlying) ~ suffix // debug for now, so that we can see where the TypeVars are.
case _ =>
tp.fallbackToText(this)
@@ -374,7 +374,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
Text(node.productIterator.map(toTextElem).toList, ", ")
val tpSuffix =
if (ctx.settings.printtypes.value && tree.hasType)
- " | " ~ toText(tree.tpe.asInstanceOf[Type])
+ " | " ~ toText(tree.typeOpt)
else
Text()