diff options
author | Martin Odersky <odersky@gmail.com> | 2008-02-23 21:56:27 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-02-23 21:56:27 +0000 |
commit | 12a0200eae15615cf81caa3be8febda00c968919 (patch) | |
tree | 71a56d496898f16bc0a01c757f58faa801a1c644 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | dbf12a761a461e95282e37cf8ff548e431c601cb (diff) | |
download | scala-12a0200eae15615cf81caa3be8febda00c968919.tar.gz scala-12a0200eae15615cf81caa3be8febda00c968919.tar.bz2 scala-12a0200eae15615cf81caa3be8febda00c968919.zip |
fixed tests
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 a689aa6fd5..de1f3f3119 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -538,7 +538,8 @@ abstract class RefChecks extends InfoTransform { !(receiver isSubClass actual)) nonSensible("", false) else if ((receiver hasFlag FINAL) && hasObjectEquals && !isValueClass(receiver) && - !(receiver isSubClass actual) && receiver != AllRefClass && actual != AllRefClass) + !(receiver isSubClass actual) && receiver != AllRefClass && actual != AllRefClass && + (name == nme.EQ || name == nme.LE)) nonSensible("non-null ", false) else if ((isNew(qual) || isNew(args.head)) && hasObjectEquals) nonSensibleWarning("a fresh object", false) |