summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-02-01 17:38:56 -0800
committerPaul Phillips <paulp@improving.org>2013-02-01 17:38:56 -0800
commita45a78a1d4111709acdc0bca9a1ac869a8e53ea5 (patch)
tree5c909c41db2470c460cbb3c33672294c9342b914 /test/pending/run
parent26de4394b19d6614b7d414b33f66ebf7adcb8833 (diff)
parent644eb7078a11613a06dcaaefb807cbcc44f65ea7 (diff)
downloadscala-a45a78a1d4111709acdc0bca9a1ac869a8e53ea5.tar.gz
scala-a45a78a1d4111709acdc0bca9a1ac869a8e53ea5.tar.bz2
scala-a45a78a1d4111709acdc0bca9a1ac869a8e53ea5.zip
Merge commit '644eb7078a' into wip/fresh-merge2
Conflicts: build.xml src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/t4574.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/pending/run/t4574.scala b/test/pending/run/t4574.scala
new file mode 100644
index 0000000000..1dde496aca
--- /dev/null
+++ b/test/pending/run/t4574.scala
@@ -0,0 +1,13 @@
+object Test {
+ val xs: List[(Int, Int)] = List((2, 2), null)
+
+ def expectMatchError[T](msg: String)(body: => T) {
+ try { body ; assert(false, "Should not succeed.") }
+ catch { case _: MatchError => println(msg) }
+ }
+
+ def main(args: Array[String]): Unit = {
+ expectMatchError("I hereby refute null!")( for ((x, y) <- xs) yield x )
+ expectMatchError("I denounce null as unListLike!")( (null: Any) match { case List(_*) => true } )
+ }
+}