diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-08-12 14:20:14 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-08-12 17:22:29 +0200 |
commit | 21fcf64c8197b481325c3765b897f7159817875c (patch) | |
tree | 6df076827f7446b746e9cf45eb7ca1660a128723 /test | |
parent | a80b538763d88604d93b8c71604042c69e6b1073 (diff) | |
download | scala-21fcf64c8197b481325c3765b897f7159817875c.tar.gz scala-21fcf64c8197b481325c3765b897f7159817875c.tar.bz2 scala-21fcf64c8197b481325c3765b897f7159817875c.zip |
Fixes SI-6214.
addSynthetics was calling typedStat that caused flushing error buffer. Typically that would result in errors being re-added but addSynthetics was the last thing to run in typedStats.
Instead of adding yet another check I used this as an opportunity to cleanup the once necessary workaround for typing stats. Since we are now chaining buffers of contexts manual handling is no longer necessary.
Review by @odersky (I recall that you were planning to cleanup that part at some point).
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6214.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6214.scala | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/test/files/neg/t6214.check b/test/files/neg/t6214.check new file mode 100644 index 0000000000..6349a3e71c --- /dev/null +++ b/test/files/neg/t6214.check @@ -0,0 +1,4 @@ +t6214.scala:5: error: missing parameter type + m { s => case class Foo() } + ^ +one error found diff --git a/test/files/neg/t6214.scala b/test/files/neg/t6214.scala new file mode 100644 index 0000000000..734acda35e --- /dev/null +++ b/test/files/neg/t6214.scala @@ -0,0 +1,7 @@ +object Test { + def m(f: String => Unit) = 0 + def m(f: Int => Unit) = 0 + def foo { + m { s => case class Foo() } + } +} |