From f4de6344eb8d0b237145a773be81ba92f8021a74 Mon Sep 17 00:00:00 2001 From: Artur Opala <250927+arturopala@users.noreply.github.com> Date: Thu, 10 Dec 2020 09:23:44 +0000 Subject: [PATCH] Fix an example of covariant type From the context of the document, it looks like a `type`, not a `def`, should be used here. --- docs/docs/reference/new-types/type-lambdas-spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/reference/new-types/type-lambdas-spec.md b/docs/docs/reference/new-types/type-lambdas-spec.md index e17662a174a7..6d44e493988e 100644 --- a/docs/docs/reference/new-types/type-lambdas-spec.md +++ b/docs/docs/reference/new-types/type-lambdas-spec.md @@ -89,7 +89,7 @@ is treated as a shorthand for ``` Abstract types and opaque type aliases remember the variances they were created with. So the type ```scala -def F2[-A, +B] +type F2[-A, +B] ``` is known to be contravariant in `A` and covariant in `B` and can be instantiated only with types that satisfy these constraints. Likewise