Aladdin - Scala Bugtracking
[#1047] project: specification priority: low category: bug
submitter assigned to status date submitted
Burak Burak fixed 2007-04-16 20:59:04.0
subject spec still says xml seq matching is allowed
code
object Test2 extends Application {
  val seq = <name>luc</name><name>mat</name>
  seq match {
    case <name>{ _* }</name><name>{ _* }</name> => Console.println("jup")
    case _ => ()
  }
}
what happened
Lukas Rytz says:
Hi Burak,

the scala-spec talks about pattern matching "sequences of [...] XML trees".
I tried this, but didn't get it working, the compiler tells me:
  '=>' expected but $XMLSTART$ < found
See example below.
what expected spec to be precise (XML sequence matching was given up at some point), possibly implementation to give nicer error message.
[back to overview]
Changes of this bug report
Martin  edited on  2007-04-17 16:20:31.0
Burak  edited on  2007-04-17 16:26:37.0
Burak  edited on  2007-04-17 16:28:34.0
fixed the spec. for the record, it is a quagmire to define xml seq patterns, either one must be different from xml and disallow text and whitespace between adjacent element patterns, or allow them and deal with it, which is terrible. Thus they are not allowed, and the spec does not promise them anymore.