diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-10-10 14:40:43 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-10-10 16:10:18 +0200 |
commit | 82c60609eb0525fb3be6add7d110ec6c072ba3de (patch) | |
tree | 850e58a1bcba8de4acd55927585ca2b09799fd60 | |
parent | 946dd5af0d3b8935e4a57d865c291b0311017edf (diff) | |
download | scala-82c60609eb0525fb3be6add7d110ec6c072ba3de.tar.gz scala-82c60609eb0525fb3be6add7d110ec6c072ba3de.tar.bz2 scala-82c60609eb0525fb3be6add7d110ec6c072ba3de.zip |
Ensure delambafy:inline for anonymous function class javap test
https://issues.scala-lang.org/browse/SI-8898
-rw-r--r-- | test/files/run/repl-javap-outdir-funs.flags | 1 | ||||
-rw-r--r-- | test/files/run/repl-javap-outdir-funs/run-repl_7.scala | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/test/files/run/repl-javap-outdir-funs.flags b/test/files/run/repl-javap-outdir-funs.flags new file mode 100644 index 0000000000..ac96850b69 --- /dev/null +++ b/test/files/run/repl-javap-outdir-funs.flags @@ -0,0 +1 @@ +-Ydelambdafy:inline
\ No newline at end of file diff --git a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala index 6c6fe2d515..af9651a8a3 100644 --- a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala +++ b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala @@ -1,6 +1,8 @@ import scala.tools.partest.JavapTest object Test extends JavapTest { + // note the '-fun': it makes :javap search for some anonfun. + // for that reason, this test has a flags file that forces delambdafy:inline (doesn't allow :method) def code = """ |:javap -fun disktest/Foo.class """.stripMargin @@ -11,7 +13,8 @@ object Test extends JavapTest { if (scala.tools.partest.utils.Properties.isAvian) true else { - def filtered = res filter (_ contains "public final class disktest.Foo") + val r = "public final class disktest.Foo.*extends scala.runtime.AbstractFunction1".r + def filtered = res filter (r.findFirstIn(_).nonEmpty) 1 == filtered.size } } |