summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-07-24 00:49:12 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-07-24 00:49:12 -0700
commit54b5bea7a498be3520b12aa9107d64ab946e67a8 (patch)
treeaa79cc5a830a685c13a2625142c3f3c6df2155b8 /test/files/neg
parent3bcd6f8cb5ad63dff3514fd2d74fdcc23959bec2 (diff)
parent98a5f06e3841ac988a819a4928ffd827efec221e (diff)
downloadscala-54b5bea7a498be3520b12aa9107d64ab946e67a8.tar.gz
scala-54b5bea7a498be3520b12aa9107d64ab946e67a8.tar.bz2
scala-54b5bea7a498be3520b12aa9107d64ab946e67a8.zip
Merge pull request #979 from adriaanm/ticket-6111
SI-6111 accept single-subpattern unapply pattern
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/t997.check8
-rw-r--r--test/files/neg/t997.scala2
2 files changed, 2 insertions, 8 deletions
diff --git a/test/files/neg/t997.check b/test/files/neg/t997.check
index c9fe0de756..186095f44a 100644
--- a/test/files/neg/t997.check
+++ b/test/files/neg/t997.check
@@ -1,13 +1,7 @@
-t997.scala:7: error: wrong number of arguments for object Foo
-"x" match { case Foo(a) => Console.println(a) }
- ^
-t997.scala:7: error: not found: value a
-"x" match { case Foo(a) => Console.println(a) }
- ^
t997.scala:13: error: wrong number of arguments for object Foo
"x" match { case Foo(a, b, c) => Console.println((a,b,c)) }
^
t997.scala:13: error: not found: value a
"x" match { case Foo(a, b, c) => Console.println((a,b,c)) }
^
-four errors found
+two errors found
diff --git a/test/files/neg/t997.scala b/test/files/neg/t997.scala
index 42b46174d6..e8d10f4317 100644
--- a/test/files/neg/t997.scala
+++ b/test/files/neg/t997.scala
@@ -3,7 +3,7 @@ object Foo { def unapply(x : String) = Some(Pair(x, x)) }
object Test extends App {
-// Prints 'x'; ought not to compile (or maybe a should be the Pair?).
+// Prints '(x, x)'. Should compile as per SI-6111.
"x" match { case Foo(a) => Console.println(a) }
// Prints '(x,x)' as expected.