@@ -112,24 +112,21 @@ The precise rules for equality checking are as follows.
112
112
113
113
If the ` strictEquality ` feature is enabled then
114
114
a comparison using ` x == y ` or ` x != y ` between values ` x: T ` and ` y: U `
115
- is legal if
116
-
117
- 1 . there is a given instance for ` Eql[T, U] ` , or
118
- 2 . one of ` T ` , ` U ` is ` Null ` .
115
+ is legal if there is a given instance for ` Eql[T, U] ` .
119
116
120
117
In the default case where the ` strictEquality ` feature is not enabled the comparison is
121
118
also legal if
122
119
123
- 1 . ` T ` and ` U ` the same, or
124
- 2 . one of ` T ` and ` U ` is a subtype of the _ lifted_ version of the other type, or
125
- 3 . neither ` T ` nor ` U ` have a _ reflexive ` Eql ` given.
120
+ 1 . ` T ` and ` U ` are the same, or
121
+ 2 . one of ` T ` , ` U ` is a subtype of the _ lifted_ version of the other type, or
122
+ 3 . neither ` T ` nor ` U ` have a _ reflexive _ ` Eql ` given.
126
123
127
124
Explanations:
128
125
129
126
- _ lifting_ a type ` S ` means replacing all references to abstract types
130
127
in covariant positions of ` S ` by their upper bound, and to replacing
131
128
all refinement types in covariant positions of ` S ` by their parent.
132
- - a type ` T ` has a _ reflexive ` Eql ` given if the implicit search for ` Eql[T, T] `
129
+ - a type ` T ` has a _ reflexive _ ` Eql ` given if the implicit search for ` Eql[T, T] `
133
130
succeeds.
134
131
135
132
## Predefined Eql Instances
@@ -139,7 +136,7 @@ The `Eql` object defines givens for comparing
139
136
- ` java.lang.Number ` , ` java.lang.Boolean ` , and ` java.lang.Character ` ,
140
137
- ` scala.collection.Seq ` , and ` scala.collection.Set ` .
141
138
142
- Given instances are defined so that every one of these types has a reflexive ` Eql ` given, and the following holds:
139
+ Given instances are defined so that every one of these types has a _ reflexive _ ` Eql ` given, and the following holds:
143
140
144
141
- Primitive numeric types can be compared with each other.
145
142
- Primitive numeric types can be compared with subtypes of ` java.lang.Number ` (and _ vice versa_ ).
0 commit comments