summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2015-05-04 10:53:45 +0200
committerLukas Rytz <lukas.rytz@typesafe.com>2015-05-04 10:53:45 +0200
commitf1d7423ed41f516f9db8abd2364b764109150b6f (patch)
treeecf549df81911564ae70f125c6229bbeab0de9bc /src/compiler
parente547c6ec097fcaaab237655300ce0036deb37e72 (diff)
parentfd14b6184250430b826c067bd7f3685d27ba9773 (diff)
downloadscala-f1d7423ed41f516f9db8abd2364b764109150b6f.tar.gz
scala-f1d7423ed41f516f9db8abd2364b764109150b6f.tar.bz2
scala-f1d7423ed41f516f9db8abd2364b764109150b6f.zip
Merge pull request #4473 from retronym/ticket/9285
SI-9285 Don't warn about non-sensible equals in synthetic methods
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index a3a4c70d1e..4b30b4e436 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1122,7 +1122,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
}
/** Sensibility check examines flavors of equals. */
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) =>
+ case Select(qual, name @ (nme.EQ | nme.NE | nme.eq | nme.ne)) if args.length == 1 && isObjectOrAnyComparisonMethod(fn.symbol) && !currentOwner.isSynthetic =>
checkSensibleEquals(pos, qual, name, fn.symbol, args.head)
case _ =>
}