diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-06 20:13:42 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-06 20:26:24 +0200 |
commit | f5d1f35f872acb4cc2b7af8835c96ccbfa143642 (patch) | |
tree | 87a37964715bd318c49ae7aeb73c68c5bf95a30f /test | |
parent | 6ae2dd8dc4556e8085710122097c849fdeac6d95 (diff) | |
download | scala-f5d1f35f872acb4cc2b7af8835c96ccbfa143642.tar.gz scala-f5d1f35f872acb4cc2b7af8835c96ccbfa143642.tar.bz2 scala-f5d1f35f872acb4cc2b7af8835c96ccbfa143642.zip |
Support methodHandle / invokeDynamic constant pool entries in scalap
Add support in scalap to parse new constant pool entries
- MethodHandle
- MethodType
- InvokeDynamic
Spec: https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/scalapInvokedynamic.check | 5 | ||||
-rw-r--r-- | test/files/run/scalapInvokedynamic.scala | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/scalapInvokedynamic.check b/test/files/run/scalapInvokedynamic.check new file mode 100644 index 0000000000..8e4b08f234 --- /dev/null +++ b/test/files/run/scalapInvokedynamic.check @@ -0,0 +1,5 @@ +class C extends scala.AnyRef { + def this() = { /* compiled code */ } + def m: java.lang.String = { /* compiled code */ } +} + diff --git a/test/files/run/scalapInvokedynamic.scala b/test/files/run/scalapInvokedynamic.scala new file mode 100644 index 0000000000..670cf26662 --- /dev/null +++ b/test/files/run/scalapInvokedynamic.scala @@ -0,0 +1,11 @@ +class C { + def m = { + val f = (x: String) => x.trim + f(" H ae i ") + } +} + +object Test extends App { + val testClassesDir = System.getProperty("partest.output") + scala.tools.scalap.Main.main(Array("-cp", testClassesDir, "C")) +}
\ No newline at end of file |