diff options
author | Martin Odersky <odersky@gmail.com> | 2014-04-21 11:56:52 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-08 21:48:08 +0200 |
commit | b4e5d395785576d1b6d84a35ec9ab4e7f6df6031 (patch) | |
tree | df740de3fd3fb86d3229f0ef4e577271f4ecccfd /src | |
parent | 0fed5dd63f5d40a2aba012fca46f8901d0d4b70d (diff) | |
download | dotty-b4e5d395785576d1b6d84a35ec9ab4e7f6df6031.tar.gz dotty-b4e5d395785576d1b6d84a35ec9ab4e7f6df6031.tar.bz2 dotty-b4e5d395785576d1b6d84a35ec9ab4e7f6df6031.zip |
Better printing of type variables
Will now print the full chain of instances using ? for uninstantiated and ' for
instantiated.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index f10aa7225..308470885 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -143,7 +143,7 @@ class PlainPrinter(_ctx: Context) extends Printer { toTextLocal(tpe) ~ " " ~ toText(annot) case tp: TypeVar => val suffix = if (tp.isInstantiated) "'" else "?" - toTextLocal(tp.stripTypeVar) ~ suffix // debug for now, so that we can see where the TypeVars are. + toTextLocal(tp.instanceOpt orElse tp.origin) ~ suffix // debug for now, so that we can see where the TypeVars are. case _ => tp.fallbackToText(this) } |