Allow changing of lambda SAM types (alter method descriptor)
This is currently the 'slow' implementation and actually slows down invokeinterface too - need to get the fast version done...
This commit is contained in:
17
testdata-java8/src/main/java/basic/LambdaI.java
Normal file
17
testdata-java8/src/main/java/basic/LambdaI.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package basic;
|
||||
|
||||
public class LambdaI {
|
||||
|
||||
public interface Foo { String m(String in); }
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
run();
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
Foo f = (s) -> s;
|
||||
return f.m("a");
|
||||
}
|
||||
|
||||
}
|
||||
17
testdata-java8/src/main/java/basic/LambdaI2.java
Normal file
17
testdata-java8/src/main/java/basic/LambdaI2.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package basic;
|
||||
|
||||
public class LambdaI2 {
|
||||
|
||||
public interface Foo { String m(String in, String in2); }
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
run();
|
||||
}
|
||||
|
||||
public static String run() {
|
||||
Foo f = (s,t) -> s+t;
|
||||
return f.m("a", "b");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user