We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b75cd30 + 86d1109 commit 7a9cb21Copy full SHA for 7a9cb21
_overviews/scala3-book/ca-multiversal-equality.md
@@ -175,14 +175,12 @@ case class AudioBook(
175
// override to allow AudioBook to be compared to PrintedBook
176
override def equals(that: Any): Boolean = that match
177
case a: AudioBook =>
178
- if this.author == a.author
+ this.author == a.author
179
&& this.title == a.title
180
&& this.year == a.year
181
&& this.lengthInMinutes == a.lengthInMinutes
182
- then true else false
183
case p: PrintedBook =>
184
- if this.author == p.author && this.title == p.title
185
+ this.author == p.author && this.title == p.title
186
case _ =>
187
false
188
```
0 commit comments