Skip to content

Commit 3a7a92b

Browse files
committed
Test case closes SI-4124.
This looks like a job for... virtpatmat!
1 parent 3511e59 commit 3a7a92b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/files/run/t4124.check

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hi
2+
hi
3+
bye
4+
bye

test/files/run/t4124.scala

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import xml.Node
2+
3+
object Test extends App {
4+
val body: Node = <elem>hi</elem>
5+
println ((body: AnyRef, "foo") match {
6+
case (node: Node, "bar") => "bye"
7+
case (ser: Serializable, "foo") => "hi"
8+
})
9+
10+
println ((body, "foo") match {
11+
case (node: Node, "bar") => "bye"
12+
case (ser: Serializable, "foo") => "hi"
13+
})
14+
15+
println ((body: AnyRef, "foo") match {
16+
case (node: Node, "foo") => "bye"
17+
case (ser: Serializable, "foo") => "hi"
18+
})
19+
20+
println ((body: AnyRef, "foo") match {
21+
case (node: Node, "foo") => "bye"
22+
case (ser: Serializable, "foo") => "hi"
23+
})
24+
}

0 commit comments

Comments
 (0)