diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-27 13:35:34 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-27 13:35:34 -0700 |
commit | 9b310bc906257724fb0772cee116e4a7ebdb0acb (patch) | |
tree | 3811bc4bf114d76b33994bb037bc3ed4b6012c32 /test/files | |
parent | 19009075305dea67c8cad23f2ae38719906e774f (diff) | |
parent | 5b54681d0360616efdb2a561ce9201fbd67e7288 (diff) | |
download | scala-9b310bc906257724fb0772cee116e4a7ebdb0acb.tar.gz scala-9b310bc906257724fb0772cee116e4a7ebdb0acb.tar.bz2 scala-9b310bc906257724fb0772cee116e4a7ebdb0acb.zip |
Merge pull request #2583 from som-snytt/issue/7473-pointless-for-crash
SI-7473 Bad for expr crashes postfix
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/t7473.check | 7 | ||||
-rw-r--r-- | test/files/neg/t7473.scala | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/neg/t7473.check b/test/files/neg/t7473.check new file mode 100644 index 0000000000..bc8c29d463 --- /dev/null +++ b/test/files/neg/t7473.check @@ -0,0 +1,7 @@ +t7473.scala:6: error: '<-' expected but '=' found. + (for (x = Option(i); if x == j) yield 42) toList + ^ +t7473.scala:6: error: illegal start of simple expression + (for (x = Option(i); if x == j) yield 42) toList + ^ +two errors found diff --git a/test/files/neg/t7473.scala b/test/files/neg/t7473.scala new file mode 100644 index 0000000000..593231d5f2 --- /dev/null +++ b/test/files/neg/t7473.scala @@ -0,0 +1,7 @@ + +object Foo { + val i,j = 3 + //for (x = Option(i); if x == j) yield 42 //t7473.scala:4: error: '<-' expected but '=' found. + // evil postfix! + (for (x = Option(i); if x == j) yield 42) toList +} |