diff --git a/tests/run/i16459.scala b/tests/run/i16459.scala
index 627efc554de9..dd4cf14fbc88 100644
--- a/tests/run/i16459.scala
+++ b/tests/run/i16459.scala
@@ -2,12 +2,18 @@ object Test {
import scala.xml.*
def main(args: Array[String]): Unit = {
- val xml = if(true) {
+ val singleQuotedTextCase = if(true) {
} else
empty
+
+ val casePatMatch = for (case t @ FooBar <- Seq(xml))
+ yield t
+ // TODO: This fails
+ val casePatMatchWithCond = for (case t @ FooBar if true <- Seq(xml))
+ yield t
assert(
xml match
@@ -45,6 +51,9 @@ package scala.xml {
def child = Nil
}
class Elem(prefix: String, val label: String, attributes1: MetaData, scope: NamespaceBinding, minimizeEmpty: Boolean, val child: Node*) extends Node
+ object Elem {
+ def unapply(e:Elem):Option[(String,String,Any,Text,Any)] = Some(("dummy","dummy",null,null,null))
+ }
class NodeBuffer extends Seq[Node] {
val nodes = scala.collection.mutable.ArrayBuffer.empty[Node]
def &+(o: Any): NodeBuffer = o match {