aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-07 18:14:29 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-07 18:14:29 +0100
commit377eb3318cdacd2dfb91d56be3649431ec1155f0 (patch)
tree058530f166821fdc58df3ba9833006c9da3d481c /src/dotty/tools/dotc/core
parente74b6316b93993e3c798bd9df45d83fc0665c52e (diff)
downloaddotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.tar.gz
dotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.tar.bz2
dotty-377eb3318cdacd2dfb91d56be3649431ec1155f0.zip
Fixes for desugarings of case classes.
Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala2
-rw-r--r--src/dotty/tools/dotc/core/pickling/UnPickler.scala3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala
index 50e5b518b..03e9f3bfc 100644
--- a/src/dotty/tools/dotc/core/StdNames.scala
+++ b/src/dotty/tools/dotc/core/StdNames.scala
@@ -628,6 +628,8 @@ object StdNames {
LOCALDUMMY_PREFIX ++ clazz.name ++ ">"
def newBitmapName(bitmapPrefix: TermName, n: Int): TermName = bitmapPrefix ++ n.toString
+
+ def selectorName(n: Int): TermName = "_" + (n + 1)
}
class ScalaTypeNames extends ScalaNames[TypeName] {
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
index 21bdbcce9..88dbca4f7 100644
--- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala
@@ -407,7 +407,8 @@ class UnPickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClassRoot:
owner.setFlag(DefaultParameterized)
}
- val name = name0.adjustIfModuleClass(flags)
+ val name1 = name0.adjustIfModuleClass(flags)
+ val name = if (name1 == nme.IMPLCLASS_CONSTRUCTOR) nme.CONSTRUCTOR else name1
def isClassRoot = (name == classRoot.name) && (owner == classRoot.owner) && !(flags is ModuleClass)
def isModuleClassRoot = (name == moduleClassRoot.name) && (owner == moduleClassRoot.owner) && (flags is Module)