diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 4d727591..71734187 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -97,7 +97,12 @@ public class Unify { Set>> cartResult = setOps.cartesianProduct(secondLevelSetList); Set> flat = new HashSet<>(); - cartResult.stream().forEach(x -> flat.addAll(x)); + for(List> s : cartResult) { + Set flat1 = new HashSet<>(); + for(Set s1 : s) + flat1.addAll(s1); + flat.add(flat1); + } topLevelSets.add(flat); }