summaryrefslogtreecommitdiff
path: root/test/pending/pos
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-01-13 16:15:31 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-01-13 16:15:31 -0800
commit4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64 (patch)
tree3cf9f1aef204698998656b1a508bf81427089af4 /test/pending/pos
parent8bc8603e333c730b00fc306899ece643ad892fbe (diff)
parent10f58e9d6aec2026772129dc540b95defe267025 (diff)
downloadscala-4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64.tar.gz
scala-4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64.tar.bz2
scala-4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64.zip
Merge pull request #3275 from paulp/pr/patmat
Improves name-based patmat.
Diffstat (limited to 'test/pending/pos')
-rw-r--r--test/pending/pos/t8128b.scala18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/pending/pos/t8128b.scala b/test/pending/pos/t8128b.scala
new file mode 100644
index 0000000000..dd44a25a90
--- /dev/null
+++ b/test/pending/pos/t8128b.scala
@@ -0,0 +1,18 @@
+class Optiony[X] { def isEmpty = true; def get: X = ??? }
+class Seqy[X] { def head: X = ???; def length = 0; def apply(i: Int): X = ??? }
+
+object G {
+ def unapply(m: Any): Optiony[_] = ???
+}
+
+object H {
+ def unapplySeq(m: Any): Optiony[Seqy[_]] = ???
+}
+
+object Test {
+ (0: Any) match {
+ case G(v) => v
+ case H(v) => v
+ case _ =>
+ }
+}