diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-25 13:11:29 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-25 13:16:19 +0100 |
commit | 510ae8bf1c6932595c1313c4b7a8027c435640be (patch) | |
tree | 562a816379be6cd8997c079ffabcfe1eaf7c39f6 /src/dotty/tools/dotc/core/pickling/UnPickler.scala | |
parent | 19d92a561b06dc257a71ba0f330fe4e594d1fd06 (diff) | |
download | dotty-510ae8bf1c6932595c1313c4b7a8027c435640be.tar.gz dotty-510ae8bf1c6932595c1313c4b7a8027c435640be.tar.bz2 dotty-510ae8bf1c6932595c1313c4b7a8027c435640be.zip |
Cleanup of TermRef.withSym and TypeRef.withSym
All occurrences replaced by select, or second version of Term/TypeRef.apply
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/UnPickler.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/UnPickler.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala index 415bc250a..57fc3007a 100644 --- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala +++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala @@ -103,7 +103,7 @@ object UnPickler { } val ost = if ((selfInfo eq NoType) && (denot is ModuleClass)) - TermRef.withSym(denot.owner.thisType, denot.sourceModule.asTerm) + denot.owner.thisType select denot.sourceModule else selfInfo denot.info = ClassInfo(denot.owner.thisType, denot.classSymbol, parentRefs, decls, ost) } @@ -598,7 +598,7 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: case SINGLEtpe => val pre = readTypeRef() val sym = readDisambiguatedSymbolRef(_.info.isParameterless) - if (isLocal(sym) || (pre == NoPrefix)) TermRef.withSym(pre, sym.asTerm) + if (isLocal(sym) || (pre == NoPrefix)) pre select sym else TermRef.withSig(pre, sym.name.asTermName, NotAMethod) // !!! should become redundant case SUPERtpe => val thistpe = readTypeRef() @@ -628,10 +628,10 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot: } val tycon = if (isLocal(sym) || pre == NoPrefix) { - TypeRef.withSym( - if ((pre eq NoPrefix) && (sym is TypeParam)) sym.owner.thisType else pre, - sym.asType) - } else TypeRef(pre, sym.name.asTypeName) + val pre1 = if ((pre eq NoPrefix) && (sym is TypeParam)) sym.owner.thisType else pre + pre1 select sym + } + else TypeRef(pre, sym.name.asTypeName) val args = until(end, readTypeRef) // if (args.nonEmpty) { // DEBUG // println(s"reading app type $tycon $args") |