You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/changed-features/implicit-resolution.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ a type:
76
76
1. If _T_ is a reference to an opaque type alias named _A_, _S_ includes
77
77
a reference to an object _A_ defined in the same scope as the type, if it exists,
78
78
as well as the implicit scope of _T_'s underlying type or bounds.
79
-
1. If _T_ is a reference to an an abstract type or match type alias
79
+
1. If _T_ is a reference to an abstract type or match type alias
80
80
named _A_, _S_ includes a reference to an object _A_ defined in the same scope as the type, if it exists, as well as the implicit scopes of _T_'s given bounds.
81
81
1. If _T_ is a reference to an anchor of the form _p.A_ then _S_ also includes
82
82
all term references on the path _p_.
@@ -107,8 +107,8 @@ which means that the alternative `c` would be chosen as solution!
107
107
Scala 2's somewhat puzzling behavior with respect to ambiguity has been exploited to implement
108
108
the analogue of a "negated" search in implicit resolution, where a query `Q1` fails if some
109
109
other query `Q2` succeeds and `Q1` succeeds if `Q2` fails. With the new cleaned up behavior
110
-
these techniques no longer work. But there is now a new special type `scala.util.Not`
111
-
which implements negation directly. For any query type `Q`: `Not[Q]` succeeds if and only if
110
+
these techniques no longer work. But there is now a new special type `scala.util.NotGiven`
111
+
which implements negation directly. For any query type `Q`, `NotGiven[Q]` succeeds if and only if
112
112
the implicit search for `Q` fails.
113
113
114
114
**5.** The treatment of divergence errors has also changed. A divergent implicit is treated as a normal failure, after which alternatives are still tried. This also makes sense: Encountering a divergent implicit means that we assume that no finite solution can be found on the corresponding path, but another path can still be tried. By contrast,
0 commit comments