diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-05-12 07:15:40 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-05-12 07:20:08 +0200 |
commit | 3a7a92bd9263a932c5a3f64307641b374923580a (patch) | |
tree | 00532a38cbe96f66a2c76954deffaee0e566536d /test/files/run | |
parent | 3511e5960d510eafcb67c388ec0b5b60aafdd8f3 (diff) | |
download | scala-3a7a92bd9263a932c5a3f64307641b374923580a.tar.gz scala-3a7a92bd9263a932c5a3f64307641b374923580a.tar.bz2 scala-3a7a92bd9263a932c5a3f64307641b374923580a.zip |
Test case closes SI-4124.
This looks like a job for... virtpatmat!
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t4124.check | 4 | ||||
-rw-r--r-- | test/files/run/t4124.scala | 24 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/files/run/t4124.check b/test/files/run/t4124.check new file mode 100644 index 0000000000..66a0092d93 --- /dev/null +++ b/test/files/run/t4124.check @@ -0,0 +1,4 @@ +hi +hi +bye +bye diff --git a/test/files/run/t4124.scala b/test/files/run/t4124.scala new file mode 100644 index 0000000000..9f35b57ce3 --- /dev/null +++ b/test/files/run/t4124.scala @@ -0,0 +1,24 @@ +import xml.Node + +object Test extends App { + val body: Node = <elem>hi</elem> + println ((body: AnyRef, "foo") match { + case (node: Node, "bar") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body, "foo") match { + case (node: Node, "bar") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body: AnyRef, "foo") match { + case (node: Node, "foo") => "bye" + case (ser: Serializable, "foo") => "hi" + }) + + println ((body: AnyRef, "foo") match { + case (node: Node, "foo") => "bye" + case (ser: Serializable, "foo") => "hi" + }) +} |