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/release-notes/syntax-changes-0.22.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,17 +39,16 @@ Context bounds remain supported as a shorthand for one-parameter typeclass const
39
39
defmax[T:Ordering](x: T, y: T):T= ...
40
40
given [T:Ordering] as Ordering[List[T]] { ... }
41
41
```
42
-
43
-
## Context Functions
44
-
45
-
Implicit function types `implicit A => B` have been replaced with context function types, which are written `A ?=> B`. The syntax `(given A) => B` that was used in earlier Dotty versions is no longer supported.
46
-
47
-
The same change applies to context function values. It's now
42
+
Parameters of context function values are also written with `using`. So it is
48
43
```scala
49
-
(x: A) ?=>E
44
+
(usingx: A) =>E
50
45
```
51
46
instead of `(implicit x: A) => E` or `(given x: A) => E`.
52
47
48
+
## Context Functions Types
49
+
50
+
Implicit function types `implicit A => B` have been replaced with context function types, which are written `A ?=> B`. The syntax `(given A) => B` that was used in earlier Dotty versions is no longer supported.
51
+
53
52
## Given Imports
54
53
55
54
The syntax of wildcard given import selectors is now `given _`. Examples
0 commit comments