diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-01-13 16:15:31 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-01-13 16:15:31 -0800 |
commit | 4065b5136f2d0d1b6b9bb03f6669c1fd8a2b4e64 (patch) | |
tree | 3cf9f1aef204698998656b1a508bf81427089af4 /test/pending | |
parent | 8bc8603e333c730b00fc306899ece643ad892fbe (diff) | |
parent | 10f58e9d6aec2026772129dc540b95defe267025 (diff) | |
download | scala-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')
-rw-r--r-- | test/pending/pos/t8128b.scala | 18 |
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 _ => + } +} |