summaryrefslogtreecommitdiff
path: root/test/files/neg/t5060.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-06 10:00:13 +0000
committerPaul Phillips <paulp@improving.org>2011-10-06 10:00:13 +0000
commit0afd6d1b192900f2a0cda3a8fa3d8498ded91d5f (patch)
treed019e2cd31e06a0663b7dda825b7a6d1eef61516 /test/files/neg/t5060.check
parent1e0f7dcb4fcc216afff4b88555d5751bbcc9a58d (diff)
downloadscala-0afd6d1b192900f2a0cda3a8fa3d8498ded91d5f.tar.gz
scala-0afd6d1b192900f2a0cda3a8fa3d8498ded91d5f.tar.bz2
scala-0afd6d1b192900f2a0cda3a8fa3d8498ded91d5f.zip
Closing soundness hole in variance checking.
See SI-5060. Review by odersky.
Diffstat (limited to 'test/files/neg/t5060.check')
-rw-r--r--test/files/neg/t5060.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t5060.check b/test/files/neg/t5060.check
new file mode 100644
index 0000000000..ab860c9d5b
--- /dev/null
+++ b/test/files/neg/t5060.check
@@ -0,0 +1,7 @@
+t5060.scala:2: error: covariant type T occurs in contravariant position in type => Object with ScalaObject{def contains(x: T): Unit} of value foo0
+ val foo0 = {
+ ^
+t5060.scala:6: error: covariant type T occurs in contravariant position in type => Object with ScalaObject{def contains(x: T): Unit} of method foo1
+ def foo1 = {
+ ^
+two errors found