forked from JavaTX/JavaCompilerCore
fixed flattening of sets
This commit is contained in:
parent
b0aeaae80e
commit
ff0d1e907f
@ -97,7 +97,12 @@ public class Unify {
|
|||||||
Set<List<Set<UnifyPair>>> cartResult = setOps.cartesianProduct(secondLevelSetList);
|
Set<List<Set<UnifyPair>>> cartResult = setOps.cartesianProduct(secondLevelSetList);
|
||||||
|
|
||||||
Set<Set<UnifyPair>> flat = new HashSet<>();
|
Set<Set<UnifyPair>> flat = new HashSet<>();
|
||||||
cartResult.stream().forEach(x -> flat.addAll(x));
|
for(List<Set<UnifyPair>> s : cartResult) {
|
||||||
|
Set<UnifyPair> flat1 = new HashSet<>();
|
||||||
|
for(Set<UnifyPair> s1 : s)
|
||||||
|
flat1.addAll(s1);
|
||||||
|
flat.add(flat1);
|
||||||
|
}
|
||||||
topLevelSets.add(flat);
|
topLevelSets.add(flat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user