forked from JavaTX/JavaCompilerCore
modified: ../../src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
This commit is contained in:
parent
59243d9f94
commit
fc870fd706
@ -428,7 +428,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
i++;
|
i++;
|
||||||
Set<Set<UnifyPair>> elems = new HashSet<Set<UnifyPair>>(fstElems);
|
Set<Set<UnifyPair>> elems = new HashSet<Set<UnifyPair>>(fstElems);
|
||||||
elems.add(a);
|
elems.add(a);
|
||||||
if (remainingSets.isEmpty()) {
|
//if (remainingSets.isEmpty()) {//muss immer gegeben sein, weil nur 1 Element der topLevelSets mehr als ein Elemet enthaelt
|
||||||
Set<Set<UnifyPair>> res = unify2(elems, eq, fc, parallel);
|
Set<Set<UnifyPair>> res = unify2(elems, eq, fc, parallel);
|
||||||
if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) {
|
if (!isUndefinedPairSetSet(res) && isUndefinedPairSetSet(result)) {
|
||||||
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
|
//wenn korrektes Ergebnis gefunden alle Fehlerfaelle loeschen
|
||||||
@ -449,12 +449,12 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
//}
|
||||||
else {//duerfte gar nicht mehr vorkommen PL 2018-04-03
|
//else {//duerfte gar nicht mehr vorkommen PL 2018-04-03
|
||||||
result.addAll(computeCartesianRecursive(elems, remainingSets, eq, fc, parallel));
|
//result.addAll(computeCartesianRecursive(elems, remainingSets, eq, fc, parallel));
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (!result.isEmpty() && !isUndefinedPairSetSet(result)) {
|
if (!result.isEmpty() && !isUndefinedPairSetSet(res)) {
|
||||||
if (nextSetasList.iterator().hasNext() && nextSetasList.iterator().next().stream().filter(x -> x.getLhsType().getName().equals("D")).findFirst().isPresent() && nextSetasList.size()>1)
|
if (nextSetasList.iterator().hasNext() && nextSetasList.iterator().next().stream().filter(x -> x.getLhsType().getName().equals("D")).findFirst().isPresent() && nextSetasList.size()>1)
|
||||||
System.out.print("");
|
System.out.print("");
|
||||||
Iterator<Set<UnifyPair>> nextSetasListIt = new ArrayList<Set<UnifyPair>>(nextSetasList).iterator();
|
Iterator<Set<UnifyPair>> nextSetasListIt = new ArrayList<Set<UnifyPair>>(nextSetasList).iterator();
|
||||||
@ -483,8 +483,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isUndefinedPairSetSet(result)) {
|
if (isUndefinedPairSetSet(res)) {
|
||||||
Set<UnifyPair> abhSubst = result.stream()
|
Set<UnifyPair> abhSubst = res.stream()
|
||||||
.map(b ->
|
.map(b ->
|
||||||
b.stream()
|
b.stream()
|
||||||
.map(x -> x.getAllSubstitutions())
|
.map(x -> x.getAllSubstitutions())
|
||||||
|
Loading…
Reference in New Issue
Block a user