summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2010-09-05 15:37:48 +0000
committerIulian Dragos <jaguarul@gmail.com>2010-09-05 15:37:48 +0000
commitec0f4422e0c3a6256c9adb69d3245c71141e2790 (patch)
tree0033b0cbcac91485bc076bc085456857ce7162b1 /src
parentad22d88f5666fafd41ac1dabf98d7c0d828ed852 (diff)
downloadscala-ec0f4422e0c3a6256c9adb69d3245c71141e2790.tar.gz
scala-ec0f4422e0c3a6256c9adb69d3245c71141e2790.tar.bz2
scala-ec0f4422e0c3a6256c9adb69d3245c71141e2790.zip
Closes #3803. No Review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index 0f6b3c26f5..9c7059bc76 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -1147,7 +1147,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
if (symbol.isConstructor) {
val t = atOwner(symbol) {
val superRef: Tree = Select(Super(nme.EMPTY.toTypeName, nme.EMPTY.toTypeName), nme.CONSTRUCTOR)
- forwardCtorCall(tree.pos, superRef, vparamss)
+ forwardCtorCall(tree.pos, superRef, vparamss, symbol.owner)
}
if (symbol.isPrimaryConstructor) localTyper typed {
atPos(symbol.pos)(treeCopy.DefDef(tree, mods, name, tparams, vparamss, tpt, Block(List(t), Literal(()))))
@@ -1401,9 +1401,9 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
atPos(pos) { (receiver /: argss) (Apply) }
}
- private def forwardCtorCall(pos: util.Position, receiver: Tree, paramss: List[List[ValDef]]): Tree = {
+ private def forwardCtorCall(pos: util.Position, receiver: Tree, paramss: List[List[ValDef]], clazz: Symbol): Tree = {
val argss = paramss map (_ map (x =>
- if (x.name.endsWith("$sp"))
+ if (x.name.endsWith("$sp") && clazz.info.member(nme.originalName(x.name)).isPublic)
gen.mkAsInstanceOf(Literal(Constant(null)), x.symbol.tpe)
else
Ident(x.symbol))