summaryrefslogtreecommitdiff
path: root/test/files/neg/t3692.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-04 05:28:27 +0000
committerPaul Phillips <paulp@improving.org>2010-10-04 05:28:27 +0000
commita7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992 (patch)
tree24dab3548d8cef970a748d149ebd566cce808e64 /test/files/neg/t3692.check
parentafea859ef64122f71525405625d0006150d87fb0 (diff)
downloadscala-a7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992.tar.gz
scala-a7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992.tar.bz2
scala-a7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992.zip
Pattern matching on Array types, working for re...
Pattern matching on Array types, working for reals. def f[T](a: Array[T]) = a match { case x: Array[Int] => x(0) case x: Array[Double] => 2 // etc. } I'd also like to thank "instantiateTypeVar" for displacing the mechanical spiders and giant squid beings which used to fill my nightmares. Now that I know true horror, I welcome the squid. Closes #2755, review by odersky.
Diffstat (limited to 'test/files/neg/t3692.check')
-rw-r--r--test/files/neg/t3692.check12
1 files changed, 1 insertions, 11 deletions
diff --git a/test/files/neg/t3692.check b/test/files/neg/t3692.check
index ce89a6563d..96ddd2a461 100644
--- a/test/files/neg/t3692.check
+++ b/test/files/neg/t3692.check
@@ -1,14 +1,4 @@
-t3692.scala:11: warning: type Integer in package scala is deprecated: use <code>java.lang.Integer</code> instead
- case m0: Map[Int, Int] => new java.util.HashMap[Integer, Integer]
- ^
-t3692.scala:12: warning: type Integer in package scala is deprecated: use <code>java.lang.Integer</code> instead
- case m1: Map[Int, V] => new java.util.HashMap[Integer, V]
- ^
-t3692.scala:13: warning: type Integer in package scala is deprecated: use <code>java.lang.Integer</code> instead
- case m2: Map[T, Int] => new java.util.HashMap[T, Integer]
- ^
-t3692.scala:13: error: unreachable code
+t3692.scala:15: error: unreachable code
case m2: Map[T, Int] => new java.util.HashMap[T, Integer]
^
-three warnings found
one error found