mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
new inference: do not skip contradicted bounds
(cherry picked from commit 8ce52d2dc87cfde0471a65c55df972711bffa1c4)
This commit is contained in:
+2
-4
@@ -142,9 +142,8 @@ public class InferenceIncorporationPhase {
|
||||
*/
|
||||
private void upDown(List<PsiType> eqBounds, List<PsiType> upperBounds) {
|
||||
for (PsiType upperBound : upperBounds) {
|
||||
final boolean properType = mySession.isProperType(upperBound);
|
||||
if (upperBound == null) continue;
|
||||
for (PsiType eqBound : eqBounds) {
|
||||
if (properType && mySession.isProperType(eqBound)) continue;
|
||||
if (!upperBound.equals(eqBound) && !upperBound.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) {
|
||||
addConstraint(new SubtypingConstraint(upperBound, eqBound, true));
|
||||
}
|
||||
@@ -157,9 +156,8 @@ public class InferenceIncorporationPhase {
|
||||
*/
|
||||
private void upperLower(List<PsiType> upperBounds, List<PsiType> lowerBounds) {
|
||||
for (PsiType upperBound : upperBounds) {
|
||||
final boolean properType = mySession.isProperType(upperBound);
|
||||
if (upperBound == null) continue;
|
||||
for (PsiType lowerBound : lowerBounds) {
|
||||
if (properType && mySession.isProperType(lowerBound)) continue;
|
||||
if (!upperBound.equals(lowerBound)) {
|
||||
addConstraint(new SubtypingConstraint(upperBound, lowerBound, true));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user