summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-05-18 10:14:19 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2010-05-18 10:14:19 +0000
commit0577b210982f2c912c133f99cca72c9ea4ab5bcc (patch)
tree76b892ece8a3d7d51efc567d54fc9fd07711f0d9 /src/compiler/scala/tools
parentb7f77112a5701585d6af24a28178279da96c489d (diff)
downloadscala-0577b210982f2c912c133f99cca72c9ea4ab5bcc.tar.gz
scala-0577b210982f2c912c133f99cca72c9ea4ab5bcc.tar.bz2
scala-0577b210982f2c912c133f99cca72c9ea4ab5bcc.zip
Closes #3417. No review (already done by Martin)
Diffstat (limited to 'src/compiler/scala/tools')
-rw-r--r--src/compiler/scala/tools/nsc/transform/AddInterfaces.scala3
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
index e08b76443c..f1ed9f43a0 100644
--- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
+++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
@@ -161,7 +161,8 @@ abstract class AddInterfaces extends InfoTransform {
case ClassInfoType(parents, decls, _) =>
assert(phase == implClassPhase)
ClassInfoType(
- ObjectClass.tpe :: (parents.tail map mixinToImplClass) ::: List(iface.tpe),
+ ObjectClass.tpe :: (parents.tail map mixinToImplClass filter (_.typeSymbol != ObjectClass))
+ ::: List(iface.tpe),
implDecls(sym, decls),
sym)
case PolyType(tparams, restpe) =>
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala
index 9f36fe342c..4c000ce3f7 100644
--- a/src/compiler/scala/tools/nsc/transform/Erasure.scala
+++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala
@@ -335,9 +335,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast.
def erasedTypeRef(sym: Symbol): Type =
typeRef(erasure(sym.owner.tpe), sym, List())
- /** Remove duplicate references to class Object in a list of parent classes
- * todo: needed?
- */
+ /** Remove duplicate references to class Object in a list of parent classes */
private def removeDoubleObject(tps: List[Type]): List[Type] = tps match {
case List() => List()
case tp :: tps1 =>
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala
index d39176e8a9..bc04796e1f 100644
--- a/src/compiler/scala/tools/nsc/transform/Mixin.scala
+++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala
@@ -567,7 +567,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
val newSyms = newDefs map (_.symbol)
def isNotDuplicate(tree: Tree) = tree match {
case DefDef(_, _, _, _, _, _) =>
- val sym = tree.symbol;
+ val sym = tree.symbol
!(sym.isDeferred &&
(newSyms exists (nsym => nsym.name == sym.name && (nsym.tpe matches sym.tpe))))
case _ =>