Reversing alone would disturb the parameters (#298)
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 1m2s
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 1m2s
This commit is contained in:
parent
82b4450857
commit
877e5ed38a
@ -906,7 +906,6 @@ public class RuleSet implements IRuleSet{
|
||||
|
||||
var fiArgs = fc.getFunctionalInterfaceTypeArguments(refType);
|
||||
var retType = fiArgs.getFirst();
|
||||
System.out.println(lhsType.getName());
|
||||
var lhsArgs = fc.getFunctionalInterfaceTypeArguments(lhsType);
|
||||
var lhsRet = lhsArgs.getFirst();
|
||||
|
||||
|
@ -4,6 +4,7 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.sql.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
@ -613,7 +614,14 @@ implements IFiniteClosure {
|
||||
|
||||
@Override
|
||||
public List<UnifyType> getFunctionalInterfaceTypeArguments(UnifyType t) {
|
||||
if (t instanceof FunNType) return Arrays.asList(t.getTypeParams().get()).reversed();
|
||||
if (t instanceof FunNType) {
|
||||
var ret = new ArrayList<UnifyType>();
|
||||
if (t.getTypeParams().size() > 0) {
|
||||
ret.add(t.getTypeParams().get(t.getTypeParams().size() - 1));
|
||||
ret.addAll(Arrays.asList(t.getTypeParams().get()).subList(0, t.getTypeParams().size() - 1));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
var clazz = compiler.getClass(new JavaClassName(t.getName()));
|
||||
var intfMethod = clazz.getMethods().stream().filter(m -> Modifier.isAbstract(m.modifier)).findFirst().orElseThrow();
|
||||
|
Loading…
Reference in New Issue
Block a user