summaryrefslogtreecommitdiff
path: root/test/files/run/t3705.scala
blob: 3ebf6fc95d05b3580e90c434027acb4450492e85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// package foo

import scala.xml._
object Test {
  // guard caused verifyerror in oldpatmat
  def updateNodes(ns: Seq[Node]): Seq[Node] =
    for(subnode <- ns) yield subnode match {
      case <d>{_}</d> if true => <d>abc</d>
      case Elem(prefix, label, attribs, scope, children @ _*) =>
        Elem(prefix, label, attribs, scope, minimizeEmpty = true, updateNodes(children) : _*)
      case other => other
    }
  def main(args: Array[String]): Unit = {
    updateNodes(<b />)
  }
}