aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/variances.check
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/variances.check
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/variances.check')
-rw-r--r--tests/untried/neg/variances.check25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/untried/neg/variances.check b/tests/untried/neg/variances.check
new file mode 100644
index 000000000..cb1a60a63
--- /dev/null
+++ b/tests/untried/neg/variances.check
@@ -0,0 +1,25 @@
+variances.scala:4: error: covariant type A occurs in contravariant position in type test.Vector[A] of value x
+ def append(x: Vector[A]): Vector[A]
+ ^
+variances.scala:75: error: covariant type A occurs in contravariant position in type => A => A of value m
+ val m: A => A
+ ^
+variances.scala:18: error: covariant type A occurs in contravariant position in type A of value a
+ private def setA3(a : A) = this.a = a
+ ^
+variances.scala:19: error: covariant type A occurs in contravariant position in type A of value a
+ protected def setA4(a : A) = this.a = a
+ ^
+variances.scala:21: error: covariant type A occurs in invariant position in supertype test.C[A] of object Baz
+ object Baz extends C[A]
+ ^
+variances.scala:74: error: covariant type A occurs in contravariant position in type => test.Covariant.T[A]{val m: A => A} of value x
+ val x: T[A] {
+ ^
+variances.scala:89: error: covariant type T occurs in invariant position in type T of type A
+ type A = T
+ ^
+variances.scala:90: error: covariant type T occurs in contravariant position in type => test.TestAlias.B[C.this.A] of method foo
+ def foo: B[A]
+ ^
+8 errors found