-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scala 2.13 - cannot compare child class to parent class in assertTrue #8874
Comments
I was wrong (from equals Javadoc):
|
It seems like https://docs.scala-lang.org/overviews/quasiquotes/syntax-summary.html#types - |
Hey @andrzejressel, I was going to link this issue on why I think this behaviour is correct for Scala 2 but not for Scala 3, but then I realised you were the one that opened it 😅 Why do you think that in this case Scala 3's behaviour is correct but not Scala 2's? |
They are both a bit scuffed - basically I believe that all directly related classes should be comparable in any order. In Scala 2.13 it didn't work because of bug with implicit conversion finding, in Scala 3 it does not work because this conversion is not implemented for equals (only for EDIT: Even equals JavaDoc agrees with that - comparing parent to child should (must?) return the same as comparing child to parent. |
/bounty $75 |
💎 $75 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio! Add a bounty • Share on socials
|
💡 @andrzejressel submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @andrzejressel has been awarded $75! 🎈🎊 |
Scala 2.13 only
https://scastie.scala-lang.org/rwgljZz2Q6m0aDTwkBDczA
error:
Prepared test for
SmartAssertionSpec.scala
The text was updated successfully, but these errors were encountered: