modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java

This commit is contained in:
Martin Plümicke 2018-04-11 11:10:08 +02:00
parent 603c4c9c46
commit fef4d27d21

View File

@ -453,14 +453,15 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
}
}
if (isUndefinedPairSetSet(result)) {
Set<UnifyPair> abhSubst = result.stream().findFirst()
.get()
.stream()
Set<UnifyPair> 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<UnifyPair> durchschnitt = abhSubst.stream()
.filter(x -> a.contains(x))
.filter(y -> abhSubst.contains(y))
//.filter(y -> abhSubst.contains(y))
.collect(Collectors.toCollection(HashSet::new));
Set<PlaceholderType> vars = durchschnitt.stream().map(x -> (PlaceholderType)x.getLhsType()).collect(Collectors.toCollection(HashSet::new));
nextSetasList = nextSetasList.stream().filter(x -> {