diff options
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 8 | ||||
-rw-r--r-- | src/dotty/tools/dotc/printing/RefinedPrinter.scala | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index 71c255c17..84936fbac 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -100,8 +100,8 @@ class PlainPrinter(_ctx: Context) extends Printer { toText(tp.underlying) ~ ".type" case tp: SingletonType => toText(tp.underlying) ~ "(" ~ toTextRef(tp) ~ ")" - case tp @ TypeRef(pre, name) => - toTextPrefix(pre) ~ selectionString(tp) + case tp: TypeRef => + toTextPrefix(tp.prefix) ~ selectionString(tp) case tp: RefinedType => // return tp.toString // !!! DEBUG val parent :: (refined: List[RefinedType]) = @@ -187,8 +187,8 @@ class PlainPrinter(_ctx: Context) extends Printer { /** The string representation of this type used as a prefix */ protected def toTextRef(tp: SingletonType): Text = controlled { tp match { - case tp @ TermRef(pre, name) => - toTextPrefix(pre) ~ selectionString(tp) + case tp: TermRef => + toTextPrefix(tp.prefix) ~ selectionString(tp) case ThisType(cls) => nameString(cls) + ".this" case SuperType(thistpe: SingletonType, _) => diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala index df00280ac..87f9fc29e 100644 --- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -57,7 +57,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { tp match { case ThisType(cls) => if (isOmittablePrefix(cls)) return "" - case tp @ TermRef(pre, name) => + case tp @ TermRef(pre, _) => val sym = tp.symbol if (sym.isPackageObject) return toTextPrefix(pre) if (isOmittablePrefix(sym)) return "" @@ -109,7 +109,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { } case tp: ViewProto => return toText(tp.argType) ~ " ?=>? " ~ toText(tp.resultType) - case tp @ TypeRef(pre, name) => + case tp: TypeRef => if (tp.symbol is TypeParam | TypeArgument) { return tp.info match { case TypeAlias(hi) => toText(hi) |