diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-24 11:33:34 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-28 12:58:03 +0200 |
commit | fddd576b1183e394cdfb47f074fe7918a37644b6 (patch) | |
tree | 6600969e7bf4af33c5d65cbeef3db92e5dd1b813 /test/files/pos | |
parent | bcc82808ecf056affecf11b14f3ad850ad21d773 (diff) | |
download | scala-fddd576b1183e394cdfb47f074fe7918a37644b6.tar.gz scala-fddd576b1183e394cdfb47f074fe7918a37644b6.tar.bz2 scala-fddd576b1183e394cdfb47f074fe7918a37644b6.zip |
don't check exhaustivity involving user-defined unapplySeq
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/exhaustive_heuristics.scala | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/files/pos/exhaustive_heuristics.scala b/test/files/pos/exhaustive_heuristics.scala index f6bea455a5..297900510b 100644 --- a/test/files/pos/exhaustive_heuristics.scala +++ b/test/files/pos/exhaustive_heuristics.scala @@ -12,5 +12,15 @@ object Test { case _ if turnOffChecks => } - // TODO: we back off when there are any user-defined extractors + // we back off when there are any user-defined extractors + // in fact this is exhaustive, but we pretend we don't know since List's unapplySeq is not special to the compiler + // to compensate our ignorance, we back off + // well, in truth, we do rewrite List() to Nil, but otherwise we do nothing + // the full rewrite List(a, b) to a :: b :: Nil, for example is planned (but not sure it's a good idea) + List(true, false) match { + case List(_, _, _*) => + case List(node, _*) => + case Nil => + } + }
\ No newline at end of file |