From 8f640e8a1d4a24f845005343a58e1297f51865fd Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 1 Jul 2012 00:35:21 +0200 Subject: SI-5932 Tone down non-sensible == warning with refinements. Errs on the side of avoiding false positives. --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 119bb0852c..44fd4e9afd 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1150,7 +1150,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R nonSensiblyNew() else if (isNew(args.head) && (receiver.isEffectivelyFinal || isReferenceOp)) // object X ; X == new Y nonSensiblyNew() - else if (receiver.isEffectivelyFinal && !(receiver isSubClass actual)) { // object X, Y; X == Y + else if (receiver.isEffectivelyFinal && !(receiver isSubClass actual) && !actual.isRefinementClass) { // object X, Y; X == Y if (isEitherNullable) nonSensible("non-null ", false) else -- cgit v1.2.3