diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 3f9466cf..b1cbbe7b 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -571,8 +571,9 @@ public class TypeUnifyTask extends RecursiveTask>> { if (!durchschnitt.isEmpty()) { UnifyPair groundBasepair = res.iterator().next().iterator().next().getGroundBasePair().get(); Set undefRes = res.stream().reduce((y,z) -> { y.addAll(z); return y;}).get(); - Set> reducedUndefResSubst = undefRes.stream() - .map(x -> x.getAllSubstitutions()).map(y -> { y.removeAll(durchschnitt); return y;}) + Set> reducedUndefResSubstGroundedBasePair = undefRes.stream() + .map(x -> { Set su = x.getAllSubstitutions(); su.add(x.getGroundBasePair().get()); return su;}) + .map(y -> { y.removeAll(durchschnitt); return y;}) .collect(Collectors.toCollection(HashSet::new)); Set resGroundBasepairs = undefRes.stream().map(x -> x.getGroundBasePair().get()).collect(Collectors.toCollection(HashSet::new)); if (res.size() > 1) {