summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-18 10:32:06 -0700
committerPaul Phillips <paulp@improving.org>2013-05-18 10:56:57 -0700
commit2b5e60e8b357b93664706e14437ae954315263e0 (patch)
treebf11f0a7d330d44c73dd18b5f816d4b86647c19a /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parent01dec25425cefb6acc147d8341893eb70ca76245 (diff)
parentd93826f278b2ee8be3c4092bf800c2156d35d692 (diff)
downloadscala-2b5e60e8b357b93664706e14437ae954315263e0.tar.gz
scala-2b5e60e8b357b93664706e14437ae954315263e0.tar.bz2
scala-2b5e60e8b357b93664706e14437ae954315263e0.zip
Merge commit 'd93826f278' into pr/enter-elimination-mode
* commit 'd93826f278': Incorporated reviewer feedback. Incorporated reviewer feedback. Refactored stabilize. Eliminated HKmode. Eliminated RETmode. Eliminated SNDTRYmode. Started eliminating modes. Corralling Modes into a smaller pen. Conflicts: src/compiler/scala/tools/nsc/typechecker/Macros.scala src/compiler/scala/tools/nsc/typechecker/RefChecks.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 53f296f801..50b92f13ab 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -951,6 +951,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
}
def checkSensible(pos: Position, fn: Tree, args: List[Tree]) = fn match {
case Select(qual, name @ (nme.EQ | nme.NE | nme.eq | nme.ne)) if args.length == 1 && isObjectOrAnyComparisonMethod(fn.symbol) =>
+ // Make sure the 'eq' or 'ne' method is the one in AnyRef.
def isReferenceOp = fn.symbol == Object_eq || fn.symbol == Object_ne
def isNew(tree: Tree) = tree match {
case Function(_, _)