ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 172 forks source link

Avian does not support constructor references. #540

Closed chrisr3 closed 7 years ago

chrisr3 commented 7 years ago

Given the following test case:

Supplier<java.util.List<String>> s = java.util.ArrayList<String>::new;
java.util.List<String> list = s.get();

Avian fails with this error:

java/lang/AssertionError: todo: implement '8' per http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-5.html#jvms-5.4.3.5
  at java/lang/invoke/LambdaMetafactory.makeInvocationCode (line 200)
  at java/lang/invoke/LambdaMetafactory.makeLambda (line 319)
  at java/lang/invoke/LambdaMetafactory.altMetafactory (line 443)
  at InvokeDynamic.test (line 151)
  at InvokeDynamic.main (line 76)

Constructor references use REF_newinvokeSpecial, apparently.

dicej commented 7 years ago

Fixed here: https://github.com/ReadyTalk/avian/commit/24b95016dd6f62fa4a82312310fcb5c55cc22f93