diff options
author | Martin Odersky <odersky@gmail.com> | 2014-07-20 14:48:34 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-03 17:28:34 +0200 |
commit | e33a7385268084138e3d51faffdff33b540ad942 (patch) | |
tree | ae547106f6a363c5487535393bc1f971441bc55f /tests/pos/typers.scala | |
parent | 38761d9d11a42635e64d6df54ecaf1968797e7e8 (diff) | |
download | dotty-e33a7385268084138e3d51faffdff33b540ad942.tar.gz dotty-e33a7385268084138e3d51faffdff33b540ad942.tar.bz2 dotty-e33a7385268084138e3d51faffdff33b540ad942.zip |
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.
Diffstat (limited to 'tests/pos/typers.scala')
-rw-r--r-- | tests/pos/typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala index a95af558e..b2d786c1c 100644 --- a/tests/pos/typers.scala +++ b/tests/pos/typers.scala @@ -32,7 +32,7 @@ object typers { } class List[+T] { - def :: (x: T) = new :: (x, this) + def :: [U >: T](x: U): List[U] = new :: (x, this) def len: Int = this match { case x :: xs1 => 1 + xs1.len |