aboutsummaryrefslogtreecommitdiff
path: root/tests/patmat/t2425.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/patmat/t2425.scala')
-rw-r--r--tests/patmat/t2425.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/patmat/t2425.scala b/tests/patmat/t2425.scala
new file mode 100644
index 000000000..477d5467a
--- /dev/null
+++ b/tests/patmat/t2425.scala
@@ -0,0 +1,15 @@
+trait B
+class D extends B
+object Test extends App {
+ def foo[T](bar: T) = {
+ bar match {
+ case _: Array[Array[_]] => println("array 2d")
+ case _: Array[_] => println("array 1d")
+ case _ => println("something else")
+ }
+ }
+ foo(Array.fill(10)(2))
+ foo(Array.fill(10, 10)(2))
+ foo(Array.fill(10, 10, 10)(2))
+ foo(List(1, 2, 3))
+}