diff options
author | Martin Odersky <odersky@gmail.com> | 2017-04-01 20:14:19 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:12 +0200 |
commit | a7ee8dc999f415dbbed9c4e60bf4ade1cf8a94eb (patch) | |
tree | 6e5def7d85a4bb2bf1e850481851ceb5acb8c4f7 /compiler/src/dotty | |
parent | bd992dd3158f192fd391605a6b51e1c23e09171d (diff) | |
download | dotty-a7ee8dc999f415dbbed9c4e60bf4ade1cf8a94eb.tar.gz dotty-a7ee8dc999f415dbbed9c4e60bf4ade1cf8a94eb.tar.bz2 dotty-a7ee8dc999f415dbbed9c4e60bf4ade1cf8a94eb.zip |
Avoid setter in Name
and fix a bug in TreeUnpickler
Diffstat (limited to 'compiler/src/dotty')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Names.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Names.scala b/compiler/src/dotty/tools/dotc/core/Names.scala index 6caba33ec..cef55a482 100644 --- a/compiler/src/dotty/tools/dotc/core/Names.scala +++ b/compiler/src/dotty/tools/dotc/core/Names.scala @@ -346,7 +346,7 @@ object Names { def isSimple = false def asSimpleName = throw new UnsupportedOperationException(s"$debugString is not a simple name") - private var simpleName: SimpleTermName = null + private[this] var simpleName: SimpleTermName = null def toSimpleName = { if (simpleName == null) simpleName = termName(toString) simpleName diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala index 7d08c958c..2908c541e 100644 --- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala +++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala @@ -416,8 +416,8 @@ class TreeUnpickler(reader: TastyReader, nameAtRef: NameRef => TermName, posUnpi val tag = readByte() val end = readEnd() var name: Name = readName() - val mname = name.mangled if (tag == TYPEDEF || tag == TYPEPARAM) name = name.toTypeName + val mname = name.mangled skipParams() val ttag = nextUnsharedTag val isAbsType = isAbstractType(ttag) |