Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into unify-test

Conflicts:
	src/main/java/de/dhbwstuttgart/typeinference/unify/TypeUnifyTask.java

 It looks like you may be committing a merge.
 If this is not correct, please remove the file
	.git/MERGE_HEAD
 and try again.
This commit is contained in:
Martin Plümicke 2019-03-07 13:42:26 +01:00
commit 47783083b0
2 changed files with 12 additions and 0 deletions

View File

@ -292,6 +292,8 @@ public class TypeUnifyTask extends RecursiveTask<Set<Set<UnifyPair>>> {
eqSubst = rules.subst(eq0, oderConstraints);
} while (eqSubst.isPresent());
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
*/

View File

@ -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();
}