diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-29 19:59:16 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:02 +0200 |
commit | d1f809f14cad2c14c312767d71361c7f2e7d8244 (patch) | |
tree | a929f8d6c9700acfc5ae031fdda6bb0852c9726e /src/dotty/tools/dotc/printing | |
parent | e749d832e9adebc502c961d743b3b29072f8116a (diff) | |
download | dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.gz dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.tar.bz2 dotty-d1f809f14cad2c14c312767d71361c7f2e7d8244.zip |
Remove old hk scheme
- Simplify RefinedType
- Drop recursive definition of RefinedThis - this is now
taken over by RecType.
- Drop RefinedThis.
- Simplify typeParams
The logic avoiding forcing is no longer needed.
- Remove unused code and out of date comments.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r-- | src/dotty/tools/dotc/printing/PlainPrinter.scala | 5 | ||||
-rw-r--r-- | src/dotty/tools/dotc/printing/RefinedPrinter.scala | 4 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index a9f5b771a..a8888fd3c 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -50,9 +50,6 @@ class PlainPrinter(_ctx: Context) extends Printer { homogenize(tp1) & homogenize(tp2) case OrType(tp1, tp2) => homogenize(tp1) | homogenize(tp2) - case tp @ TypeRef(_, tpnme.hkApplyOBS) => - val tp1 = tp.reduceProjection - if (tp1 eq tp) tp else homogenize(tp1) case tp: RefinedType => tp.normalizeHkApply case tp: SkolemType => @@ -250,8 +247,6 @@ class PlainPrinter(_ctx: Context) extends Printer { val idx = openRecs.reverse.indexOf(tp.binder) if (idx >= 0) selfRecName(idx + 1) else "{...}.this" // TODO move underlying type to an addendum, e.g. ... z3 ... where z3: ... - case tp: RefinedThis => - s"${nameString(tp.binder.typeSymbol)}{...}.this" case tp: SkolemType => if (homogenizedView) toText(tp.info) else tp.repr } diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala index 61e29982b..3da977b31 100644 --- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala +++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala @@ -118,9 +118,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) { if (defn.isTupleClass(cls)) return toTextTuple(args) return (toTextLocal(tycon) ~ "[" ~ Text(args map argText, ", ") ~ "]").close case tp @ TypeLambda(argBoundss, body) => - val variances = - if (Config.newHK) argBoundss.map(b => BindingKind.toVariance(b.bindingKind)) - else tp.classSymbol.typeParams.map(_.variance) + val variances = argBoundss.map(b => BindingKind.toVariance(b.bindingKind)) val prefix = ((('X' - 'A') + lambdaNestingLevel) % 26 + 'A').toChar val paramNames = argBoundss.indices.toList.map(prefix.toString + _) val instantiate = new TypeMap { |