diff options
author | Martin Odersky <odersky@gmail.com> | 2012-07-21 13:04:13 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-07-21 13:04:50 +0200 |
commit | d0623dc7664fc2821067b31b2b4d058bbb59ea80 (patch) | |
tree | b88512385d9ddd56eaace3fc8f0b239a60d931da /src | |
parent | 40ddd083592ba3947cb5182d6db26798bad9a9cb (diff) | |
download | scala-d0623dc7664fc2821067b31b2b4d058bbb59ea80.tar.gz scala-d0623dc7664fc2821067b31b2b4d058bbb59ea80.tar.bz2 scala-d0623dc7664fc2821067b31b2b4d058bbb59ea80.zip |
SI-6090
Sharpens the test so that only Object_== and Object_!= methods on valueclasses may be rewritten in posterasure, whereas user-defined methods are not rewritten.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/PostErasure.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/PostErasure.scala b/src/compiler/scala/tools/nsc/transform/PostErasure.scala index 151bc66a79..479bc2292e 100644 --- a/src/compiler/scala/tools/nsc/transform/PostErasure.scala +++ b/src/compiler/scala/tools/nsc/transform/PostErasure.scala @@ -52,7 +52,7 @@ trait PostErasure extends InfoTransform with TypingTransformers { List(Apply(Select(New(tpt2), nme.CONSTRUCTOR), List(arg2)))) if atPhase(currentRun.erasurePhase) { tpt1.tpe.typeSymbol.isDerivedValueClass && - (cmp == nme.EQ || cmp == nme.NE) && + (sel.symbol == Object_== || sel.symbol == Object_!=) && tpt2.tpe.typeSymbol == tpt1.tpe.typeSymbol } => val result = Apply(Select(arg1, cmp) setPos sel.pos, List(arg2)) setPos tree.pos |