[#995] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Stephane | Martin | fixed | 2007-03-12 15:39:02.0 | |
subject | Incorrect matching of type patterns | |||
code |
object test extends Application { def foo(v: Any): String = v match { case s: Seq[_] => "Seq" // see Burak's hack in object Seq.unapplySeq //case a: AnyRef if runtime.ScalaRunTime.isArray(a) => // "Array" case _ => v.toString } Console.println(foo(Array(0))) } |
|||
what happened | Prints:[I@ca8327 |
|||
what expected | Prints: Seq(or Array when using Burak's hack) |
|||
[back to overview] |
Stephane edited on 2007-03-12 15:39:54.0 |
Martin edited on 2007-03-12 16:25:43.0 |