[#398] | project: compiler | priority: high | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Martin | Burak | fixed | 2005-02-16 16:35:17.0 | |
subject | Pattern matching compiles incorrectly | |||
code |
object Test with Application { def f(ss: List[int]): unit = ss match { case List(1) => System.out.print("_"); case x :: ss1 => System.out.print(x); } f(List(2)); } |
|||
what happened | Exception in thread "main" scala.MatchError: for object List(2) in 'cases.scala' at line 3 |
|||
what expected | prints "2" | |||
[back to overview] |
Martin edited on 2005-02-16 16:37:27.0 |
If I change the first pattern to
1 :: Nilit compiles correctly. |
Burak edited on 2005-02-21 17:50:12.0 |