[groovy] IDEA-207415: More accurate handling of accessibility of light elements
authorKonstantin Nisht <konstantin.nisht@jetbrains.com>
Mon, 10 Aug 2020 00:08:33 +0000 (03:08 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Mon, 10 Aug 2020 13:53:57 +0000 (13:53 +0000)
GitOrigin-RevId: 63761e89ce8ed6aca955fd476dda6e02cc6d443c

plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/util/PsiUtil.java

index ab8c68e649f4b8ec32e575ca017a52ee8db9aa13..b3b40982305c837c2ef112e92a07868581a6eec6 100644 (file)
@@ -81,6 +81,7 @@ import org.jetbrains.plugins.groovy.lang.resolve.impl.AccessibilityKt;
 import org.jetbrains.plugins.groovy.lang.resolve.impl.ArgumentsKt;
 import org.jetbrains.plugins.groovy.lang.resolve.processors.MethodResolverProcessor;
 import org.jetbrains.plugins.groovy.lang.typing.GroovyClosureType;
+import org.jetbrains.plugins.groovy.util.dynamicMembers.DynamicMemberUtils;
 
 import java.util.*;
 
@@ -307,6 +308,10 @@ public final class PsiUtil {
   }
 
   public static boolean isAccessible(@NotNull PsiElement place, @NotNull PsiMember member) {
+    if (DynamicMemberUtils.isDynamicElement(member)) {
+      return true;
+    }
+
     return AccessibilityKt.isAccessible(member, place);
   }