diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-16 06:39:55 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-16 06:41:28 -0700 |
commit | 6559722330786dd26cc86b554296d5cb23eeb912 (patch) | |
tree | 870874beb02ccf3f4b0fb43e9d42d4f686e8af5f /src | |
parent | 8271c80ec0f01b031a82f27f17bb1b561691681f (diff) | |
download | scala-6559722330786dd26cc86b554296d5cb23eeb912.tar.gz scala-6559722330786dd26cc86b554296d5cb23eeb912.tar.bz2 scala-6559722330786dd26cc86b554296d5cb23eeb912.zip |
Closes SI-6072, crasher with overloaded eq.
You don't want to do name-based selections in later phases
if you can help it, because there is nobody left to resolve
your overloads. If as in this example you're calling a
known method, use the symbol. Review by @hubertp.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Mixin.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index fe5bef5009..930a7b34ce 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -868,7 +868,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { rhs match { case Block(List(assign), returnTree) => val Assign(moduleVarRef, _) = assign - val cond = Apply(Select(moduleVarRef, nme.eq), List(NULL)) + val cond = Apply(Select(moduleVarRef, Object_eq), List(NULL)) mkFastPathBody(clazz, moduleSym, cond, List(assign), List(NULL), returnTree, attrThis, args) case _ => assert(false, "Invalid getter " + rhs + " for module in class " + clazz) |