diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 13:07:26 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-11-10 13:13:14 +0100 |
commit | 8b2caf0746fd4405f2d47b54d17d484e6603c89d (patch) | |
tree | 452e657d03650d8760ab54ca05e0f277ea851259 /test/files | |
parent | 8b598436f64ca4e980c8a38f642085b4d23e2327 (diff) | |
download | scala-8b2caf0746fd4405f2d47b54d17d484e6603c89d.tar.gz scala-8b2caf0746fd4405f2d47b54d17d484e6603c89d.tar.bz2 scala-8b2caf0746fd4405f2d47b54d17d484e6603c89d.zip |
SI-6646 Fix regression in for desugaring.
The early check in the parser of pattern irrefutability,
added in c82ecab, failed to consider InitCaps and
`backquoted` identifiers.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t6646.check | 3 | ||||
-rw-r--r-- | test/files/run/t6646.scala | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t6646.check b/test/files/run/t6646.check new file mode 100644 index 0000000000..e27b5b9efb --- /dev/null +++ b/test/files/run/t6646.check @@ -0,0 +1,3 @@ +Found NotNull +Found lower +Found 2 diff --git a/test/files/run/t6646.scala b/test/files/run/t6646.scala new file mode 100644 index 0000000000..9418bfafb1 --- /dev/null +++ b/test/files/run/t6646.scala @@ -0,0 +1,13 @@ +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) + for (option @ NotNull <- l) println("Found " + option) + for (option @ `lower` <- l) println("Found " + option) + for ((`lower`, i) <- l.zipWithIndex) println("Found " + i) + } +} |