From 800b1ad042044d8902c76fe353f7adf0491b5f20 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 6 Apr 2017 15:34:09 +0200 Subject: 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. --- compiler/src/dotty/tools/dotc/core/NameKinds.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/src/dotty/tools/dotc/core/NameKinds.scala') 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 -- cgit v1.2.3