Skip to content

Commit f4de634

Browse files
authored
Fix an example of covariant type
From the context of the document, it looks like a `type`, not a `def`, should be used here.
1 parent 8706aa5 commit f4de634

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/reference/new-types/type-lambdas-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ is treated as a shorthand for
8989
```
9090
Abstract types and opaque type aliases remember the variances they were created with. So the type
9191
```scala
92-
def F2[-A, +B]
92+
type F2[-A, +B]
9393
```
9494
is known to be contravariant in `A` and covariant in `B` and can be instantiated only
9595
with types that satisfy these constraints. Likewise

0 commit comments

Comments
 (0)