diff options
Diffstat (limited to 'tests/new/t2425.scala')
-rwxr-xr-x | tests/new/t2425.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/new/t2425.scala b/tests/new/t2425.scala new file mode 100755 index 000000000..477d5467a --- /dev/null +++ b/tests/new/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)) +} |