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/contextual/givens.md
+10-17Lines changed: 10 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -110,30 +110,23 @@ In each case, a pattern-bound given instance consists of `given` and a type `T`.
110
110
111
111
Scala 2's somewhat puzzling behavior with respect to ambiguity has been exploited to implement the analogue of a "negated" search in implicit resolution, where a query Q1 fails if some other query Q2 succeeds and Q1 succeeds if Q2 fails. With the new cleaned up behavior these techniques no longer work. But there is now a new special type `scala.util.NotGiven` which implements negation directly.
112
112
113
-
For any query type Q: NotGiven[Q] succeeds if and only if the implicit search for Q fails. Example:
113
+
For any query type `Q`, `NotGiven[Q]` succeeds if and only if the implicit
0 commit comments