diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index ffae2c9b..68e8befa 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -508,6 +508,7 @@ public class JavaTXCompiler { logFile.write("FC:\\" + finiteClosure.toString() + "\n"); for (SourceFile sf : this.sourceFiles.values()) { logFile.write(ASTTypePrinter.print(sf)); + System.out.println(ASTTypePrinter.print(sf)); } logFile.flush(); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index b1cae201..6fc57a7f 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -607,8 +607,8 @@ public class TypeUnifyTask extends RecursiveTask>> { for (UnifyPair ele : nextSetasList.get(0)) {//check ob a <. ty base oder ob Ueberladung sameBase = sameBase && ele.getBasePair() != null && ele.getBasePair().equals(fstBasePair); } - if (sameBase) { - Optional xi = nextSetasList.stream().map(x -> x.stream().filter(y -> y.getLhsType() instanceof PlaceholderType) + if (sameBase) { //angefuegt PL 2020-02-30 + Optional xi = nextSetasList.stream().map(x -> x.stream().filter(y -> (y.getLhsType() instanceof PlaceholderType && !(y.getRhsType() instanceof PlaceholderType))) .filter(z -> ((PlaceholderType)z.getLhsType()).getVariance() != 0) .map(c -> ((PlaceholderType)c.getLhsType()).getVariance()) .reduce((a,b)-> {if (a==b) return a; else return 0; })) //2 kommt insbesondere bei Oder-Constraints vor