Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions _scala3-reference/other-new-features/matchable.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ For instance, consider the definitions

```scala
opaque type Meter = Double
def Meter(x: Double) = x
def Meter(x: Double): Meter = x

opaque type Second = Double
def Second(x: Double) = x
def Second(x: Double): Second = x
```

Here, universal `equals` will return true for
Expand All @@ -137,6 +137,7 @@ Here, universal `equals` will return true for
even though this is clearly false mathematically. With [multiversal equality](../contextual/multiversal-equality.html) one can mitigate that problem somewhat by turning

```scala
import scala.language.strictEquality
Meter(10) == Second(10)
```

Expand Down