From 860fd2eb286c48d36655ad99a068a2e61bdb1381 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 30 Aug 2013 11:10:37 +0200 Subject: More tests and fixes related to inference. Main blooper: TypeVars got dereferenced in all Typemaps, so disappeared too quickly from types during inference. --- src/dotty/tools/dotc/printing/PlainPrinter.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/printing') diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index b4e2e3770..f86075d83 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -125,7 +125,8 @@ class PlainPrinter(_ctx: Context) extends Printer { case tp: ExprType => changePrec(GlobalPrec) { "=> " ~ toText(tp.resultType) } case tp: PolyType => - def paramText(name: TypeName, bounds: TypeBounds) = toText(polyParamName(name)) ~ ": " ~ toText(bounds) + def paramText(name: TypeName, bounds: TypeBounds) = + toText(polyParamName(name)) ~ toText(bounds) changePrec(GlobalPrec) { "[" ~ Text((tp.paramNames, tp.paramBounds).zipped map paramText, ", ") ~ @@ -136,7 +137,7 @@ class PlainPrinter(_ctx: Context) extends Printer { case AnnotatedType(annot, tpe) => toTextLocal(tpe) ~ " " ~ toText(annot) case tp: TypeVar => - toTextLocal(tp.underlying) + toTextLocal(tp.underlying) ~ "'" // debug for now, so that we can see where the TypeVars are. case _ => tp.fallbackToText(this) } -- cgit v1.2.3