Object Equality examples in "Programming in Scala 5th edition" by Odersky, Spoon, Venners, Sommers #13993
spamegg1
started this conversation in
General Discussion
Replies: 1 comment 1 reply
-
That looks indeed like an error in the book. Can you send an erratum to Bill Venners? Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have Scala 3.1 that I got from Homebrew:
brew install lampepfl/brew/dotty
and OpenJDK 11:I have the June 14, 2021 version of the book. On Page 123, Section 5.8 it says
Going further, you can compare two objects that have different types:
However my REPL says:
This is not a compiler/REPL bug, right? This looks in line with Multiversal Equality
So, the book must be in error? Or maybe things changed from 3.0 to 3.1? I submitted to Errata but just wanted to double-check.
Beta Was this translation helpful? Give feedback.
All reactions