| [#181] | project: compiler | priority: low | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Matthias | Matthias | fixed | 2003-10-07 02:07:01.0 | |
| subject | | on top-level crashes pattern matcher | |||
| code |
case class One();
object Foo with Executable {
def test(xs: List[Any]) = xs match {
case List(One()) | List(One()) => Console.println("error")
}
} |
|||
| what happened | |
|||
| what expected | Either error from semantic analysis or pattern matcher compiles pattern without throwing exceptions. | |||
| [back to overview] | ||||
| Burak edited on 2003-10-30 12:10:11.0 |
|
An alternative at the top-level is passed to your matcher now, which gracefully exits with a "duplicate case" error. This is probably due to my trying to hack in Alternative handling. Could you instead add a proper node and tweak your code to treat it correctly ? |
| Matthias edited on 2004-04-26 12:43:44.0 |