[#299] | project: compiler | priority: low | category: feature | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Michel | Matthias | fixed | 2004-02-23 13:23:38.0 | |
subject | Match failures should print the matched object | |||
code |
object Test { def main(args: Array[String]): Unit = { List() match { case _ :: _ => 1 } } } |
|||
what happened | The following got printed:Exception in thread "main" scala.MatchError: in 'test_matchfail.scala' at line 3 at scala.MatchError.fail(MatchError.java:24) at Test$.main(test_matchfail.scala:3) at Test.main(test_matchfail.scala) |
|||
what expected | I would like to see, in the error message, the object on which I did the pattern matching (List() here). This is really useful while debugging, especially since the compiler is not able to say when pattern matching is not exhaustive. | |||
[back to overview] |
Matthias edited on 2004-04-26 12:44:06.0 |