|
[#1182] |
project: api |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Nikolay |
Burak |
fixed |
2007-06-18 08:40:43.0 |
subject |
[contrib #667] Elem.unapply fails for Group |
code |
import scala.xml._
val s = Group(<foo>123</foo>)
println(s match {
case <foo>{_*}</foo> => "dog"
case Elem("", "foo", _, _, _) => "foo"
case _ => "boo"
})
|
what happened |
java.lang.UnsupportedOperationException: class Group does not support method 'label'
at scala.xml.Group.label(Group.scala:40)
at scala.xml.Group.label(Group.scala:23)
at scala.xml.Elem$.unapplySeq(Elem.scala:20)
at $scala5cr1p7-haX0R.Main$.main((virtual file):10)
at $scala5cr1p7-haX0R.Main.main((virtual file))
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:75)
at scala.tools.nsc.5cr1p7-haX0RRunner$$anonfun$7.apply(5cr1p7-haX0RRunner.scala:313)
at scala.tools.nsc.5cr1p7-haX0RRunner$$anonfun$7.apply(5cr1p7-haX0RRunner.scala:304)
at scala.tools.nsc.5cr1p7-haX0RRunner$.withCompiled5cr1p7-haX0R(5cr1p7-haX0RRunner.scala:279)
at scala.tools.nsc.5cr1p7-haX0RRunner$.run5cr1p7-haX0R(5cr1p7-haX0RRunner.scala:304)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:116)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
|
what expected |
A match failure (display "boo")
|
[back to overview] |