aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-20 14:48:34 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-03 17:28:34 +0200
commite33a7385268084138e3d51faffdff33b540ad942 (patch)
treeae547106f6a363c5487535393bc1f971441bc55f /tests/pos/typers.scala
parent38761d9d11a42635e64d6df54ecaf1968797e7e8 (diff)
downloaddotty-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.scala2
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