diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-25 13:31:52 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-11-25 13:31:52 -0800 |
commit | b8f06f33a420cf07f980cab61b2a11df6a0f5dca (patch) | |
tree | 939c690f926c712c68eff3f04c1f6c34bbea6bfc /test/files/run/t6646.scala | |
parent | 8630176e985c5a8266d3afe4c4e3fb50d449630d (diff) | |
parent | faa6cfcf404b4d172f20b3ed01ba3bd59427b700 (diff) | |
download | scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.gz scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.tar.bz2 scala-b8f06f33a420cf07f980cab61b2a11df6a0f5dca.zip |
Merge pull request #1663 from paulp/merge-2.10.wip-x
Merge 2.10.0-wip into 2.10.x.
Diffstat (limited to 'test/files/run/t6646.scala')
-rw-r--r-- | test/files/run/t6646.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t6646.scala b/test/files/run/t6646.scala new file mode 100644 index 0000000000..150b0df11e --- /dev/null +++ b/test/files/run/t6646.scala @@ -0,0 +1,19 @@ +sealed trait ColumnOption +case object NotNull extends ColumnOption +case object PrimaryKey extends ColumnOption +case object lower extends ColumnOption + +object Test { + def main(args: Array[String]) { + val l = List(PrimaryKey, NotNull, lower) + + // withFilter must be generated in these + for (option @ NotNull <- l) println("Found " + option) + for (option @ `lower` <- l) println("Found " + option) + for ((`lower`, i) <- l.zipWithIndex) println("Found " + i) + + // no withFilter + for (X <- List("A single ident is always a pattern")) println(X) + for (`x` <- List("A single ident is always a pattern")) println(`x`) + } +} |