From 72cf9108c8ecca8b9e19a2afe73d937645bb5607 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 14 Nov 2013 16:24:40 +0100 Subject: [PATCH] new inference: do not skip contradicted bounds (cherry picked from commit 8ce52d2dc87cfde0471a65c55df972711bffa1c4) --- .../resolve/graphInference/InferenceIncorporationPhase.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceIncorporationPhase.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceIncorporationPhase.java index ea38888b2d7a..d57022dc158a 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceIncorporationPhase.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceIncorporationPhase.java @@ -142,9 +142,8 @@ public class InferenceIncorporationPhase { */ private void upDown(List eqBounds, List 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 upperBounds, List 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)); }