From fef4d27d2130be251e880a98d254061fbdbd9523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 11 Apr 2018 11:10:08 +0200 Subject: [PATCH] modified: src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java --- .../dhbwstuttgart/typeinference/unify/TypeUnifyTask.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -> {