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/core/tasty/TreeUnpickler.scala | |
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/core/tasty/TreeUnpickler.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index d9a062263..2d230c630 100644 --- a/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -260,7 +260,7 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { val parent = readType() val ttag = nextUnsharedTag if (ttag == TYPEBOUNDS || ttag == TYPEALIAS) name = name.toTypeName - RefinedType(parent, name, rt => registeringType(rt, readType())) + RefinedType(parent, name, readType()) // Note that the lambda "rt => ..." is not equivalent to a wildcard closure! // Eta expansion of the latter puts readType() out of the expression. case APPLIEDtype => @@ -325,8 +325,6 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { readPackageRef().termRef case TYPEREF => val name = readName().toTypeName - if (name.isLambdaTraitNameOBS) // Make sure corresponding lambda trait exists - defn.LambdaTraitOBS(name.lambdaTraitVariancesOBS) TypeRef(readType(), name) case TERMREF => readNameSplitSig() match { @@ -337,11 +335,8 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table) { ThisType.raw(readType().asInstanceOf[TypeRef]) case RECtype => RecType(rt => registeringType(rt, readType())) - case REFINEDthis => - readTypeRef() match { - case t: RefinedType => RefinedThis(t) - case t: RecType => RecThis(t) - } + case RECthis => + RecThis(readTypeRef().asInstanceOf[RecType]) case SHARED => val ref = readAddr() typeAtAddr.getOrElseUpdate(ref, forkAt(ref).readType()) |