From 080ed2f3d8b5d8fd249691aacc0fe4f9596bb772 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 5 Jun 2015 18:49:36 +0200 Subject: Split RefinedThis and SkolemType SkolemTypes need to behave differently form RefinedThis types in TypeMap and TypeAccumulator. For skolem types these should follow through to the underlying type. For RefinedThis types, these need to do nothing, in order not to start an infinite recursion. --- src/dotty/tools/dotc/printing/PlainPrinter.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/dotty/tools/dotc/printing/PlainPrinter.scala') diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 12c94677f..de1a439cf 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -228,11 +228,10 @@ class PlainPrinter(_ctx: Context) extends Printer { toText(value) case MethodParam(mt, idx) => nameString(mt.paramNames(idx)) - case sk: SkolemType => - sk.binder match { - case rt: RefinedType => s"${nameString(rt.typeSymbol)}{...}.this" - case _ => "" - } + case tp: RefinedThis => + s"${nameString(tp.binder.typeSymbol)}{...}.this" + case tp: SkolemType => + "" // !!! todo refine with unique identifier. } } -- cgit v1.2.3