aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i540.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-06 10:22:19 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-06 10:22:25 +0200
commitd26604fd50bd2c444c9dd108781d36864380b5f2 (patch)
tree06f3fa47a840dbd06dacea0d1294fc29310da2da /tests/pos/i540.scala
parent7129cbe60c062be49aef8c27da461a11416e189c (diff)
downloaddotty-d26604fd50bd2c444c9dd108781d36864380b5f2.tar.gz
dotty-d26604fd50bd2c444c9dd108781d36864380b5f2.tar.bz2
dotty-d26604fd50bd2c444c9dd108781d36864380b5f2.zip
Fix #540 - unbounded array test for wildcard array arguments
Arrays with wildcard arguments such as Array[_ <: Foo] where Foo is a universal trait are now diagnosed as unbounded generic arrays and are erased to Object.
Diffstat (limited to 'tests/pos/i540.scala')
-rw-r--r--tests/pos/i540.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pos/i540.scala b/tests/pos/i540.scala
new file mode 100644
index 000000000..b7540ab2c
--- /dev/null
+++ b/tests/pos/i540.scala
@@ -0,0 +1,6 @@
+trait Foo extends Any
+
+object Univ {
+ def univ[T <: Foo](x: Array[T]) = {}
+ def univ2(x: Array[_ <: Foo]) = {}
+}