diff options
author | Paul Phillips <paulp@improving.org> | 2010-10-04 05:28:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-10-04 05:28:27 +0000 |
commit | a7fd7d6dc257e396cf2cf22a9e0a60c3ce44a992 (patch) | |
tree | 24dab3548d8cef970a748d149ebd566cce808e64 /tools/truncate | |
parent | afea859ef64122f71525405625d0006150d87fb0 (diff) | |
download | scala-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 'tools/truncate')
0 files changed, 0 insertions, 0 deletions