aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/Variances.scala15
-rw-r--r--tests/pos/Variances.scala15
2 files changed, 0 insertions, 30 deletions
diff --git a/tests/neg/Variances.scala b/tests/neg/Variances.scala
deleted file mode 100644
index 0ceb64452..000000000
--- a/tests/neg/Variances.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-trait HasY { type Y }
-
-// These are neg-tests corresponding to the pos-test Variances.scala
-// where all the variance annotations have been inverted.
-trait Foo1[+X] { def bar[Y <: X](y: Y) = y } // error
-trait Foo2[+X] { def bar(x: HasY { type Y <: X })(y: x.Y) = y } // error
-trait Foo3[-X] { def bar[Y >: X](y: Y) = y } // error
-trait Foo4[-X] { def bar(x: HasY { type Y >: X })(y: x.Y) = y } // error
-
-// These are neg-tests corresponding to the pos-test Variances.scala
-// where all the bounds have been flipped.
-trait Foo5[-X] { def bar[Y >: X](y: Y) = y } // error
-trait Foo6[-X] { def bar(x: HasY { type Y >: X })(y: x.Y) = y } // error
-trait Foo7[+X] { def bar[Y <: X](y: Y) = y } // error
-trait Foo8[+X] { def bar(x: HasY { type Y <: X })(y: x.Y) = y } // error
diff --git a/tests/pos/Variances.scala b/tests/pos/Variances.scala
deleted file mode 100644
index 5c448ec88..000000000
--- a/tests/pos/Variances.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-trait HasY { type Y }
-
-// This works in scalac.
-trait Foo1[-X] { def bar[Y <: X](y: Y) = y }
-
-// A variant of Foo1 using a dependent method type (doesn't work using
-// scalac)
-trait Foo2[-X] { def bar(x: HasY { type Y <: X })(y: x.Y) = y }
-
-// This works in scalac.
-trait Foo3[+X] { def bar[Y >: X](y: Y) = y }
-
-// A variant of Foo3 using a dependent method type (doesn't work
-// using scalac)
-trait Foo4[+X] { def bar(x: HasY { type Y >: X })(y: x.Y) = y }