diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-02 06:41:30 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-09 12:11:14 -0800 |
commit | 567df8ef284ab7491d6e144eb169db77d8ac06be (patch) | |
tree | 3d886ae099463c28ad32a522490e104c0a596721 /test/files/neg/variances-refinement.check | |
parent | 5d66c124e3703ea37997638091663ef1d4011d4d (diff) | |
download | scala-567df8ef284ab7491d6e144eb169db77d8ac06be.tar.gz scala-567df8ef284ab7491d6e144eb169db77d8ac06be.tar.bz2 scala-567df8ef284ab7491d6e144eb169db77d8ac06be.zip |
Boosted test coverage.
Diffstat (limited to 'test/files/neg/variances-refinement.check')
-rw-r--r-- | test/files/neg/variances-refinement.check | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/neg/variances-refinement.check b/test/files/neg/variances-refinement.check new file mode 100644 index 0000000000..2bed3ffa6b --- /dev/null +++ b/test/files/neg/variances-refinement.check @@ -0,0 +1,22 @@ +variances-refinement.scala:17: error: contravariant type A occurs in covariant position in type ()AnyRef{def f0(x: A): A} of method fail1 + def fail1() = { object O { def f0(x: A): A = ??? } ; O } // fail + ^ +variances-refinement.scala:18: error: covariant type B occurs in contravariant position in type ()AnyRef{def f0(x: B): A} of method fail2 + def fail2() = { object O { def f0(x: B): A = ??? } ; O } // fail + ^ +variances-refinement.scala:19: error: covariant type B occurs in contravariant position in type ()AnyRef{def f0(x: B): B} of method fail3 + def fail3() = { object O { def f0(x: B): B = ??? } ; O } // fail + ^ +variances-refinement.scala:20: error: covariant type B occurs in contravariant position in type ()AnyRef{def f0(x: B): C} of method fail4 + def fail4() = { object O { def f0(x: B): C = ??? } ; O } // fail + ^ +variances-refinement.scala:21: error: contravariant type A occurs in covariant position in type ()AnyRef{def f0(x: C): A} of method fail5 + def fail5() = { object O { def f0(x: C): A = ??? } ; O } // fail + ^ +variances-refinement.scala:23: error: contravariant type A occurs in covariant position in type ()O1.type forSome { val O1: AnyRef with O0; type O0 <: AnyRef{def f0(x: A): A; def f1(x: A): B; def f2(x: A): C} } of method fail6 + def fail6() = { // fail + ^ +variances-refinement.scala:32: error: contravariant type A occurs in covariant position in type ()AnyRef{def f0(x: A): A; def f1(x: A): B; def f2(x: A): C} of method fail7 + def fail7() = { // fail + ^ +7 errors found |