From 046873cdeb0dc9c4b607ea25f2f1be77086e0889 Mon Sep 17 00:00:00 2001 From: Lee Date: Tue, 30 Aug 2022 17:16:54 +0800 Subject: [PATCH] Update variances.md Fix the formal description of Contravariance --- _tour/variances.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_tour/variances.md b/_tour/variances.md index beac10d015..34322e5477 100644 --- a/_tour/variances.md +++ b/_tour/variances.md @@ -116,7 +116,7 @@ We've seen we can accomplish covariance by making sure that we can't put somethi We say that `Serializer` is *contravariant* in `A`, and this is indicated by the `-` before the `A`. A more general serializer is a subtype of a more specific serializer. -More formally, that gives us the reverse relationship: given some `class Contra[-T]`, then if `A` is a subtype of `B`, `Cov[B]` is a subtype of `Cov[A]`. +More formally, that gives us the reverse relationship: given some `class Contra[-T]`, then if `A` is a subtype of `B`, `Contra[B]` is a subtype of `Contra[A]`. ### Comparison With Other Languages