diff options
author | Martin Odersky <odersky@gmail.com> | 2017-04-06 15:34:09 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-04-11 09:33:12 +0200 |
commit | 800b1ad042044d8902c76fe353f7adf0491b5f20 (patch) | |
tree | 27a99202c4b2922ef4e7f6d3f9ce58f4e6a819be /compiler/src/dotty/tools/dotc/core/NameKinds.scala | |
parent | b17af4b7abfa1de2a0099329a7e7148cabafbab0 (diff) | |
download | dotty-800b1ad042044d8902c76fe353f7adf0491b5f20.tar.gz dotty-800b1ad042044d8902c76fe353f7adf0491b5f20.tar.bz2 dotty-800b1ad042044d8902c76fe353f7adf0491b5f20.zip |
Fix pickling/unpickling of names
Running the test suite with the pickling printer on showed up two more
problems which are fixed in this commit.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/NameKinds.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/NameKinds.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/NameKinds.scala b/compiler/src/dotty/tools/dotc/core/NameKinds.scala index c34a100a8..bee39adaa 100644 --- a/compiler/src/dotty/tools/dotc/core/NameKinds.scala +++ b/compiler/src/dotty/tools/dotc/core/NameKinds.scala @@ -141,6 +141,13 @@ object NameKinds { } } + object AnyNumberedName { + def unapply(name: DerivedTermName): Option[(TermName, Int)] = name match { + case DerivedTermName(qual, info: NumberedInfo) => Some((qual, info.num)) + case _ => None + } + } + case class UniqueNameKind(val separator: String) extends NumberedNameKind(UNIQUE, s"Unique $separator") { override def definesNewName = true |