|
|
@@ -59,6 +59,13 @@ final class TestUtils {
|
|
|
}
|
|
|
|
|
|
private static Class<?> typeof_lambda(Function<?,?> function) {
|
|
|
+ // Masakra, jeśli lambda jest closure'm, to jej "metoda" pobiera więcej niż 1 argument.
|
|
|
+ // Te argumenty są "bindowane" przez inne metody-gettery pomocnicze.
|
|
|
+ //
|
|
|
+ // Dałoby się te argumenty ignorować "mądrze", bo są listowane w ConstantPool,
|
|
|
+ // ale na razie po prostu weźmy pierwsze "coś", które ma więcej niż 1 argument
|
|
|
+ // i módlmy się, żeby to nie było żadne syntetyczne gówno.
|
|
|
+
|
|
|
ConstantPool cp = Li.get(function.getClass());
|
|
|
|
|
|
for(int i=0; i<cp.getSize(); i++) {
|
|
|
@@ -70,11 +77,12 @@ final class TestUtils {
|
|
|
}
|
|
|
|
|
|
String parent = info[0];
|
|
|
- if("java/lang/Object".equals(parent) || "java/lang/Class".equals(parent)) {
|
|
|
+ String name = info[1];
|
|
|
+ if("java/lang/Object".equals(parent) || "java/lang/Class".equals(parent) || "<init>".equals(name)) {
|
|
|
continue;
|
|
|
}
|
|
|
try {
|
|
|
- if(1 != net.ranides.asm.Type.getArgumentTypes(info[2]).length) {
|
|
|
+ if(net.ranides.asm.Type.getArgumentTypes(info[2]).length < 1) {
|
|
|
continue;
|
|
|
}
|
|
|
} catch(Exception ex) {
|