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

Varianceberechnung geaendert
This commit is contained in:
Martin Plümicke 2018-04-20 09:36:29 +02:00
parent 1f031149d3
commit 93d0caaefb

View File

@ -352,7 +352,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
Optional<Integer> xi = nextSetasList.stream().map(x -> x.stream().filter(y -> y.getLhsType() instanceof PlaceholderType)
.filter(z -> ((PlaceholderType)z.getLhsType()).getVariance() != 0)
.map(c -> ((PlaceholderType)c.getLhsType()).getVariance())
.reduce((a,b)-> a*b))
.reduce((a,b)-> {if (a==b) return a; else return 0; }))
.filter(d -> d.isPresent())
.map(e -> e.get())
.findAny();