You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to match the empty string on descendants (or self) throws an
unexpected error:
scala> <x/> \\ ""
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:646)
at scala.collection.immutable.StringOps$.apply$extension(StringOps.scala:37)
at scala.xml.NodeSeq.$bslash$bslash(NodeSeq.scala:147)
...
The error should be consistent with what is thrown when trying to
match the empty string on just children:
scala> <x/> \ ""
java.lang.IllegalArgumentException
at scala.xml.NodeSeq.fail$1(NodeSeq.scala:97)
at scala.xml.NodeSeq.$bslash(NodeSeq.scala:120)
...
This was identified while writing ScalaCheck property tests.
0 commit comments