diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-23 02:42:06 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-23 02:42:06 -0700 |
commit | cebf241ad87358b0e8d2804750a4ac36e76f7091 (patch) | |
tree | 29e04607f5bf666bed4f8d78d1b757f0763fdd1e /test/files/pos/exhaustive_heuristics.scala | |
parent | 2e7daa10097246c03df1f77aebc85f1ecdebb7e9 (diff) | |
parent | 3f7b8b58748eb70aec4269f1ef63853b5ad4af60 (diff) | |
download | scala-cebf241ad87358b0e8d2804750a4ac36e76f7091.tar.gz scala-cebf241ad87358b0e8d2804750a4ac36e76f7091.tar.bz2 scala-cebf241ad87358b0e8d2804750a4ac36e76f7091.zip |
Merge pull request #601 from adriaanm/3f7b8b58748eb70aec4269f1ef63853b5ad4af60
virtpatmat: treemaker approximation refactorings and exhaustivity
Diffstat (limited to 'test/files/pos/exhaustive_heuristics.scala')
-rw-r--r-- | test/files/pos/exhaustive_heuristics.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/exhaustive_heuristics.scala b/test/files/pos/exhaustive_heuristics.scala new file mode 100644 index 0000000000..f6bea455a5 --- /dev/null +++ b/test/files/pos/exhaustive_heuristics.scala @@ -0,0 +1,16 @@ +// tests exhaustivity doesn't give warnings (due to its heuristic rewrites kicking in or it backing off) +object Test { + // List() => Nil + List(1) match { + case List() => + case x :: xs => + } + + // we don't look into guards + val turnOffChecks = true + List(1) match { + case _ if turnOffChecks => + } + + // TODO: we back off when there are any user-defined extractors +}
\ No newline at end of file |