summaryrefslogtreecommitdiff
path: root/test/files/pos/t6034.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-08-31 17:40:58 -0700
committerPaul Phillips <paulp@improving.org>2012-08-31 23:34:16 -0700
commit34893e5d77b683dfd442162f7a5a28b6901c7080 (patch)
tree62f68aedf5c9d4f6812ade5ad9589c885baf378e /test/files/pos/t6034.scala
parent78401c8220fb56ed077b99a5ffb4205c14fee736 (diff)
downloadscala-34893e5d77b683dfd442162f7a5a28b6901c7080.tar.gz
scala-34893e5d77b683dfd442162f7a5a28b6901c7080.tar.bz2
scala-34893e5d77b683dfd442162f7a5a28b6901c7080.zip
Fix for SI-6034, covariant value classes.
My summary in the ticket was incorrect. The problem was that the class type parameters were being cloned for the method and being allowed to keep their variance. I threw in an assertion for anyone attempting to create a method type with variant type parameters, because hey, why should we allow such madness.
Diffstat (limited to 'test/files/pos/t6034.scala')
-rw-r--r--test/files/pos/t6034.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/pos/t6034.scala b/test/files/pos/t6034.scala
new file mode 100644
index 0000000000..3558d7ff0b
--- /dev/null
+++ b/test/files/pos/t6034.scala
@@ -0,0 +1 @@
+final class OptPlus[+A](val x: A) extends AnyVal { }