diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-08-27 22:12:28 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-09-17 22:05:04 +0200 |
commit | c35c9c77a976b06aeae04d15493ec4995a2a6448 (patch) | |
tree | 36645b8e8791b9c809ab803033a1260df26f0b8a /test | |
parent | 9dd5f95f956fbfd1dc4bab0c7ef69cc60bf85f2c (diff) | |
download | scala-c35c9c77a976b06aeae04d15493ec4995a2a6448.tar.gz scala-c35c9c77a976b06aeae04d15493ec4995a2a6448.tar.bz2 scala-c35c9c77a976b06aeae04d15493ec4995a2a6448.zip |
Revert workaround for SI-8334
The new optimizer doesn't have this problem.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/list-optim-check.flags | 1 | ||||
-rw-r--r-- | test/files/pos/list-optim-check.scala | 21 | ||||
-rw-r--r-- | test/files/run/t8334.scala | 17 |
3 files changed, 17 insertions, 22 deletions
diff --git a/test/files/pos/list-optim-check.flags b/test/files/pos/list-optim-check.flags deleted file mode 100644 index 49d036a887..0000000000 --- a/test/files/pos/list-optim-check.flags +++ /dev/null @@ -1 +0,0 @@ --optimize diff --git a/test/files/pos/list-optim-check.scala b/test/files/pos/list-optim-check.scala deleted file mode 100644 index f6e6ddec77..0000000000 --- a/test/files/pos/list-optim-check.scala +++ /dev/null @@ -1,21 +0,0 @@ -// Tests a map known to crash in optimizer with faster List map in SI-8240. -// Equivalent tests for collect and flatmap do not crash, but are provided -// anyway. -// See ticket SI-8334 for optimizer bug. -// TODO - Remove this test once SI-8334 is fixed and has its own test. -class A { - def f: Boolean = { - val xs = Nil map (_ => return false) - true - } - - def g: Boolean = { - val xs = Nil collect { case _ => return false } - true - } - - def h: Boolean = { - val xs = Nil flatMap { _ => return false } - true - } -} diff --git a/test/files/run/t8334.scala b/test/files/run/t8334.scala new file mode 100644 index 0000000000..bc7e97bd04 --- /dev/null +++ b/test/files/run/t8334.scala @@ -0,0 +1,17 @@ +object Test extends App { + def f: Boolean = { + val xs = Nil map (_ => return false) + true + } + + def g: Boolean = { + val xs = Nil collect { case _ => return false } + true + } + + def h: Boolean = { + val xs = Nil flatMap { _ => return false } + true + } + assert(f && g && h) +} |