cache class implementation search scope on itself, not just some reference
authorpeter <peter@jetbrains.com>
Tue, 29 Sep 2015 20:38:13 +0000 (22:38 +0200)
committerpeter <peter@jetbrains.com>
Tue, 29 Sep 2015 20:38:13 +0000 (22:38 +0200)
java/java-impl/src/com/intellij/codeInsight/JavaTargetElementEvaluator.java

index 015c9efab8bc74756b00e595a166e566cdedf344..e5660c288fa975ded54ac4d586e09e5fd551e0fc 100644 (file)
@@ -315,7 +315,7 @@ public class JavaTargetElementEvaluator extends TargetElementEvaluatorEx2 implem
     if (referenceExpression != null && element instanceof PsiMethod) {
       final PsiClass[] memberClass = getMemberClass(referenceExpression, element);
       if (memberClass != null && memberClass.length == 1) {
-        return CachedValuesManager.getCachedValue(referenceExpression, new CachedValueProvider<SearchScope>() {
+        return CachedValuesManager.getCachedValue(memberClass[0], new CachedValueProvider<SearchScope>() {
           @Nullable
           @Override
           public Result<SearchScope> compute() {