diff options
author | Martin Odersky <odersky@gmail.com> | 2007-02-20 13:00:55 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-02-20 13:00:55 +0000 |
commit | 603ef144ed1d1d73021d30de954114e8abec026e (patch) | |
tree | 57adc1f7a88643be8176783a28e418a5b83f4b8c /src | |
parent | fabe192ccb6493f6f0b32c753b72a716a97a5646 (diff) | |
download | scala-603ef144ed1d1d73021d30de954114e8abec026e.tar.gz scala-603ef144ed1d1d73021d30de954114e8abec026e.tar.bz2 scala-603ef144ed1d1d73021d30de954114e8abec026e.zip |
fixed problem with serialization
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/LiftCode.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Mixin.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LiftCode.scala b/src/compiler/scala/tools/nsc/transform/LiftCode.scala index db27ab88fe..bec7141751 100644 --- a/src/compiler/scala/tools/nsc/transform/LiftCode.scala +++ b/src/compiler/scala/tools/nsc/transform/LiftCode.scala @@ -129,7 +129,7 @@ abstract class LiftCode extends Transform { throw new TypeError("cannot handle polymorphic ClassDef ("+name+"): " + tparams) val rsym = reify(cd.symbol) val rimp = reify(impl) - val rtpe = reify(self.tpe) //todo: update + val rtpe = reify(self.tpt.tpe) //todo: update reflect.ClassDef(rsym, rtpe, rimp.asInstanceOf[reflect.Template]) case tmpl @ Template(parents, body) => diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index f35eb5dcc4..4e5da87e8a 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -365,7 +365,7 @@ abstract class Mixin extends InfoTransform { tree.tpe = ifacetpe } tree - case ValDef(_, _, _, _) if (currentOwner.isImplClass && tree != emptyValDef) => + case ValDef(_, _, _, _) if currentOwner.isImplClass => EmptyTree case _ => tree diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 17b22403c4..949740adde 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -575,7 +575,10 @@ trait Namers requires Analyzer { val ainfo = typer.typedAnnotation(constr, elements) !ainfo.atp.isError } yield ainfo - if (!annots.isEmpty) sym.attributes = annots + if (!annots.isEmpty) { + val annotated = if (sym.isModule) sym.moduleClass else sym + annotated.attributes = annots + } case _ => } val result = |