diff options
author | Tor Norbye <tnorbye@google.com> | 2014-09-04 13:25:33 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2014-09-04 13:25:33 -0700 |
commit | d245f58efbfc26b13b9b9d5e52e6a83a0d76216c (patch) | |
tree | bca7d49005d81d10c70bc3f547df041c636b4300 /java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java | |
parent | 9cde0e3c015174898df8b8f3672185941fad4786 (diff) | |
parent | c3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff) | |
download | idea-d245f58efbfc26b13b9b9d5e52e6a83a0d76216c.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into merge
Diffstat (limited to 'java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java')
-rw-r--r-- | java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java index b4c971b3b469..28ad946275e9 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/PsiGraphInferenceHelper.java @@ -67,12 +67,12 @@ public class PsiGraphInferenceHelper implements PsiInferenceHelper { if (typeParameters.length == 0) return PsiSubstitutor.EMPTY; InferenceSession session = new InferenceSession(typeParameters, leftTypes, rightTypes, PsiSubstitutor.EMPTY, myManager, null); for (PsiType leftType : leftTypes) { - if (!session.isProperType(leftType)) { + if (!session.isProperType(session.substituteWithInferenceVariables(leftType))) { return session.infer(); } } for (PsiType rightType : rightTypes) { - if (!session.isProperType(rightType)) { + if (!session.isProperType(session.substituteWithInferenceVariables(rightType))) { return session.infer(); } } @@ -105,10 +105,11 @@ public class PsiGraphInferenceHelper implements PsiInferenceHelper { rightTypes = new PsiType[]{param}; } final InferenceSession inferenceSession = new InferenceSession(new PsiTypeParameter[]{typeParam}, leftTypes, rightTypes, PsiSubstitutor.EMPTY, myManager, null); - if (inferenceSession.isProperType(param) && inferenceSession.isProperType(arg)) { + if (inferenceSession.isProperType(inferenceSession.substituteWithInferenceVariables(param)) && + inferenceSession.isProperType(inferenceSession.substituteWithInferenceVariables(arg))) { boolean proceed = false; for (PsiClassType classType : typeParam.getExtendsListTypes()) { - if (!inferenceSession.isProperType(classType)) { + if (!inferenceSession.isProperType(inferenceSession.substituteWithInferenceVariables(classType))) { proceed = true; break; } |