diff --git a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java index 7a61eab2f..fc8300c83 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java +++ b/src/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java @@ -1144,7 +1144,7 @@ public class TypeUnifyTask extends RecursiveTask>> { Set resultPrime = new HashSet<>(); for(int i = 0; !allGen && i < theta.getTypeParams().size(); i++) { - //if(freshTphs.size()-1 < i) + if(freshTphs.size()-1 < i)//IST DAS RICHTIG??? PL 2018-12-12 freshTphs.add(PlaceholderType.freshPlaceholder()); resultPrime.add(new UnifyPair(freshTphs.get(i), theta.getTypeParams().get(i), PairOperator.SMALLERDOTWC, pair.getSubstitution(), pair)); } diff --git a/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java b/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java index ee206fb7e..4aa769e55 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/FiniteClosure.java @@ -5,6 +5,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Hashtable; +import java.util.List; import java.util.Optional; import java.util.Set; import java.util.function.BiFunction; @@ -572,6 +573,28 @@ implements IFiniteClosure { if ((left instanceof ExtendsType && right instanceof ReferenceType) || (right instanceof ExtendsType && left instanceof ReferenceType)) System.out.println(""); + /* + List al = new ArrayList<>(); + PlaceholderType xx =new PlaceholderType("xx"); + al.add(xx); + left = new ExtendsType(new ReferenceType("Vector", new TypeParams(al))); + right = new ReferenceType("Vector", new TypeParams(new ArrayList<>(al))); + */ + /* + List al = new ArrayList<>(); + PlaceholderType xx =new PlaceholderType("xx"); + al.add(xx); + left = new ExtendsType(xx); + right = xx; + */ + /* + List al = new ArrayList<>(); + PlaceholderType xx =new PlaceholderType("xx"); + PlaceholderType yy =new PlaceholderType("yy"); + al.add(xx); + left = yy; + right = new ExtendsType(xx); + */ //Die Faelle abfangen, bei den Variablen verglichen werden PL 2018-12-11 UnifyType ex; if (left instanceof PlaceholderType) { @@ -580,7 +603,7 @@ implements IFiniteClosure { && ((PlaceholderType)left).getName().equals(((PlaceholderType)ex).getName())) {// a <.? ? extends a oder a <.? ? super a return -1; } - else {// a <. a + else { return 0; } }