Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Obviously wrong warning when comparing fresh objects #5648
Imported From: https://issues.scala-lang.org/browse/SI-5648?orig=1
As Paul said previously: "A warning might be possible, but it's harder than it looks to warn where you want to without creating spurious warnings elsewhere."
The bug is due to handling case class comparisons like Some. A simpler example:
scala> new Some(1) == Some(1) <console>:8: warning: comparing a fresh object using `==' will always yield false new Some(1) == Some(1) ^ res1: Boolean = true
I can request a pull with a tweak, after I check all the spurious warnings elsewhere, obviously.