diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 70db967a..c0fc93ac 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -453,14 +453,15 @@ public class TypeUnifyTask extends RecursiveTask>> { } } if (isUndefinedPairSetSet(result)) { - Set abhSubst = result.stream().findFirst() - .get() - .stream() + Set abhSubst = result.stream() + .map(b -> + b.stream() .map(x -> x.getAllSubstitutions()) + .reduce((y,z) -> { y.addAll(z); return y;}).get()) .reduce((y,z) -> { y.addAll(z); return y;}).get(); Set durchschnitt = abhSubst.stream() .filter(x -> a.contains(x)) - .filter(y -> abhSubst.contains(y)) + //.filter(y -> abhSubst.contains(y)) .collect(Collectors.toCollection(HashSet::new)); Set vars = durchschnitt.stream().map(x -> (PlaceholderType)x.getLhsType()).collect(Collectors.toCollection(HashSet::new)); nextSetasList = nextSetasList.stream().filter(x -> {