diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:54 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-11 13:02:54 -0700 |
commit | 24cad039b309cf3ccd79aca8f3bae398a42ab66b (patch) | |
tree | 7074df39940276bd2f93e156310a5bc4e2948508 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | b174efbcbcf241903d2dc970f950f594b8c8c5e7 (diff) | |
download | scala-24cad039b309cf3ccd79aca8f3bae398a42ab66b.tar.gz scala-24cad039b309cf3ccd79aca8f3bae398a42ab66b.tar.bz2 scala-24cad039b309cf3ccd79aca8f3bae398a42ab66b.zip |
Eliminated HKmode.
It becomes context mode "TypeConstructor".
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 290ad76a1d..0b902318b2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -944,7 +944,8 @@ 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 => - def isReferenceOp = name == nme.eq || name == nme.ne + // 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(_, _) | Apply(Select(New(_), nme.CONSTRUCTOR), _) => true |