summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-03-14 12:33:15 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-03-14 12:33:15 -0700
commit014e4d909d5e8b8605229f1237aa175e27bf8475 (patch)
tree1ecb0f25de54d3502fe60ceef0da0d46e38d7550 /test
parentefc0905f6b7a78bf3b454fbd9adb50aab5ffe20d (diff)
parent80fc8b7818205634caa3996b18b2fd156e9aabd8 (diff)
downloadscala-014e4d909d5e8b8605229f1237aa175e27bf8475.tar.gz
scala-014e4d909d5e8b8605229f1237aa175e27bf8475.tar.bz2
scala-014e4d909d5e8b8605229f1237aa175e27bf8475.zip
Merge pull request #3623 from paulp/pr/source-210
SI-8402 Restore 2.10 variance behavior under -Xsource:2.10
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/t8265.check6
-rw-r--r--test/files/neg/t8265.flags1
-rw-r--r--test/files/neg/t8265.scala1
3 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/t8265.check b/test/files/neg/t8265.check
new file mode 100644
index 0000000000..7b1db1c4e5
--- /dev/null
+++ b/test/files/neg/t8265.check
@@ -0,0 +1,6 @@
+t8265.scala:1: warning: Construct depends on unsound variance analysis and will not compile in scala 2.11 and beyond
+class Foo[+CC[X]] { type Coll = CC[_] }
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+one warning found
+one error found
diff --git a/test/files/neg/t8265.flags b/test/files/neg/t8265.flags
new file mode 100644
index 0000000000..9d7ba7abd8
--- /dev/null
+++ b/test/files/neg/t8265.flags
@@ -0,0 +1 @@
+-Xsource:2.10 -deprecation -language:higherKinds -Xfatal-warnings
diff --git a/test/files/neg/t8265.scala b/test/files/neg/t8265.scala
new file mode 100644
index 0000000000..a215903ebc
--- /dev/null
+++ b/test/files/neg/t8265.scala
@@ -0,0 +1 @@
+class Foo[+CC[X]] { type Coll = CC[_] }