forked from JavaTX/JavaCompilerCore
modified: ../../../main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java
disableCondWildcards wird aufgerufen modified: ../../../main/java/de/dhbwstuttgart/typeinference/unify/model/UnifyPair.java /** * wenn in einem Paar bestehend aus 2 Typvariablen eine nicht wildcardtable ist, * so beide auf nicht wildcardtable setzen */ public void disableCondWildcards() eingefuegt
This commit is contained in:
parent
b46e0b855c
commit
94c32609c6
@ -531,6 +531,7 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
|
||||
|
||||
|
||||
Set<UnifyPair> eq0 = applyTypeUnificationRules(eq, fc);
|
||||
eq0.forEach(x -> x.disableCondWildcards());
|
||||
|
||||
/*
|
||||
* Step 2 and 3: Create a subset eq1s of pairs where both sides are TPH and eq2s of the other pairs
|
||||
|
@ -177,6 +177,16 @@ public class UnifyPair {
|
||||
}
|
||||
}
|
||||
|
||||
public void disableCondWildcards() {
|
||||
if (lhs instanceof PlaceholderType && rhs instanceof PlaceholderType
|
||||
&& (!((PlaceholderType)lhs).isWildcardable() || !((PlaceholderType)rhs).isWildcardable()))
|
||||
{
|
||||
((PlaceholderType)lhs).disableWildcardtable();
|
||||
((PlaceholderType)rhs).disableWildcardtable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Boolean wrongWildcard() {
|
||||
return lhs.wrongWildcard() || rhs.wrongWildcard();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user