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-23 15:02:18 +0200 |
commit | ef9d84567655d6f8c9b8541aef4beb706f2a13ec (patch) | |
tree | a0f503f70207199dbfadbc7ba2d5d08c8deb8b17 /test | |
parent | 60747c75555fdcfefc9d10460050be5e2a11ad85 (diff) | |
download | scala-ef9d84567655d6f8c9b8541aef4beb706f2a13ec.tar.gz scala-ef9d84567655d6f8c9b8541aef4beb706f2a13ec.tar.bz2 scala-ef9d84567655d6f8c9b8541aef4beb706f2a13ec.zip |
[backport] 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 |