From 31ab8804d611343eb3cf35e2c1b929d5b65a946e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 16 Mar 2017 17:07:10 +0100 Subject: Harmonize paramTypes and paramBounds MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both. --- compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala') diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index bc6897c12..d6b7adffe 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -170,7 +170,7 @@ class PlainPrinter(_ctx: Context) extends Printer { def paramText(name: TermName, tp: Type) = toText(name) ~ ": " ~ toText(tp) changePrec(GlobalPrec) { (if (tp.isImplicit) "(implicit " else "(") ~ - Text((tp.paramNames, tp.paramTypes).zipped map paramText, ", ") ~ + Text((tp.paramNames, tp.paramInfos).zipped map paramText, ", ") ~ ")" ~ toText(tp.resultType) } case tp: ExprType => @@ -178,7 +178,7 @@ class PlainPrinter(_ctx: Context) extends Printer { case tp: PolyType => def paramText(name: Name, bounds: TypeBounds): Text = name.toString ~ toText(bounds) changePrec(GlobalPrec) { - "[" ~ Text((tp.paramNames, tp.paramBounds).zipped.map(paramText), ", ") ~ + "[" ~ Text((tp.paramNames, tp.paramInfos).zipped.map(paramText), ", ") ~ "]" ~ (" => " provided !tp.resultType.isInstanceOf[MethodType]) ~ toTextGlobal(tp.resultType) } -- cgit v1.2.3