diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 |
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 98f1c96cad..f920f3c135 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1092,7 +1092,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R } // possibleNumericCount is insufficient or this will warn on e.g. Boolean == j.l.Boolean - if (nullCount == 0 && !(isSpecial(receiver) && isSpecial(actual))) { + if (isWarnable && nullCount == 0 && !(isSpecial(receiver) && isSpecial(actual))) { if (actual isSubClass receiver) () else if (receiver isSubClass actual) () // warn only if they have no common supertype below Object |