From e33a7385268084138e3d51faffdff33b540ad942 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 20 Jul 2014 14:48:34 +0200 Subject: Enabled variance checking Variance checking is now run as part of type-checking. Fixed tests that exhibited variance errors. Added tests where some classes of variance errors should be detected. --- src/dotty/tools/dotc/core/Types.scala | 1 + 1 file changed, 1 insertion(+) (limited to 'src/dotty/tools/dotc/core') diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 19141a873..474958b86 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2203,6 +2203,7 @@ object Types { override def variance = 1 override def toString = "Co" + super.toString } + final class ContraTypeBounds(lo: Type, hi: Type, hc: Int) extends CachedTypeBounds(lo, hi, hc) { override def variance = -1 override def toString = "Contra" + super.toString -- cgit v1.2.3