Skip to content

Commit

Permalink
SI-6695 Test case for fixed Array match bug
Browse files Browse the repository at this point in the history
  • Loading branch information
retronym committed Nov 21, 2012
1 parent 6cb08a1 commit 7376ad7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/files/run/t6695.scala
@@ -0,0 +1,18 @@
object Test extends App {
try {
Array("a", "b", "c") match {
case Array("a", "x", "c") => println("x")
case Array("a", "b", "x") => println("a");
case Array("a", "d", _*) => println("wrongly positive")
}
assert(false, "match succeeded")
} catch {
case _: MatchError => // okay
}

Array("a", "b", "c") match {
case Array("a", "x", "c") => println("x")
case Array("a", "b", "x") => println("a");
case Array("a", "b", _*) => // okay
}
}

0 comments on commit 7376ad7

Please sign in to comment.