diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-11-16 22:03:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 22:03:46 +0100 |
commit | eff3084b06b7d8bb9abdc62ffb13f4780c17dea4 (patch) | |
tree | ec885086cf2565d4bcd446b038011cf66086abe6 /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | 55cff2cfa3f615f9eac158b1d2394ebbf473c6fb (diff) | |
parent | a7a4e5f68c070543516aed3e4ad3e3d6c787dce1 (diff) | |
download | scala-eff3084b06b7d8bb9abdc62ffb13f4780c17dea4.tar.gz scala-eff3084b06b7d8bb9abdc62ffb13f4780c17dea4.tar.bz2 scala-eff3084b06b7d8bb9abdc62ffb13f4780c17dea4.zip |
Merge pull request #5449 from som-snytt/issue/9953
SI-9953 Any Any aborts warn on equals
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-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 116c932365..08cd5e5450 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1103,7 +1103,7 @@ abstract class RefChecks extends Transform { // better to have lubbed and lost def warnIfLubless(): Unit = { val common = global.lub(List(actual.tpe, receiver.tpe)) - if (ObjectTpe <:< common && !(ObjectTpe <:< actual.tpe && ObjectTpe <:< receiver.tpe)) + if (ObjectTpe <:< common && !(ObjectTpe <:< actual.tpe) && !(ObjectTpe <:< receiver.tpe)) unrelatedTypes() } // warn if actual has a case parent that is not same as receiver's; |