Fixes #61: support invokevirtual bootstrap method type

This commit is contained in:
Andy Clement
2014-04-28 14:10:50 -07:00
parent c5854b7aed
commit 4d9e6b287b
4 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,24 @@
package basic;
public class LambdaJ {
public interface Foo { String m(String s); }
public String getFoo(String s) {
return "foo"+s;
}
public static void main(String[] args) {
run();
}
public static String run() {
return new LambdaJ().run2();
}
public String run2() {
Foo f = this::getFoo;
return f.m("a");
}
}

View File

@@ -0,0 +1,24 @@
package basic;
public class LambdaJ2 {
public interface Foo { String m(String s, String t); }
public String getFoo(String s, String t) {
return "foo"+s+t;
}
public static void main(String[] args) {
run();
}
public static String run() {
return new LambdaJ().run2();
}
public String run2() {
Foo f = this::getFoo;
return f.m("a","b");
}
}