mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] diagnostic for EA-132329
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ import static org.jetbrains.plugins.groovy.lang.psi.impl.utils.ParenthesesUtils.
|
||||
import static org.jetbrains.plugins.groovy.lang.psi.impl.utils.ParenthesesUtils.parenthesize;
|
||||
|
||||
public class PsiImplUtil {
|
||||
private static final Logger LOG = Logger.getInstance("org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil");
|
||||
public static final Logger LOG = Logger.getInstance("org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil");
|
||||
private static final String MAIN_METHOD = "main";
|
||||
public static final Key<SoftReference<PsiCodeBlock>> PSI_CODE_BLOCK = Key.create("Psi_code_block");
|
||||
public static final Key<SoftReference<PsiTypeElement>> PSI_TYPE_ELEMENT = Key.create("psi.type.element");
|
||||
|
||||
+10
-1
@@ -21,6 +21,8 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.path.Gr
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.api.GroovyMethodCallReference;
|
||||
import org.jetbrains.plugins.groovy.lang.resolve.impl.GrImplicitCallReference;
|
||||
|
||||
import static org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil.LOG;
|
||||
|
||||
/**
|
||||
* @author Maxim.Medvedev
|
||||
*/
|
||||
@@ -72,7 +74,14 @@ public abstract class GrMethodCallImpl extends GrCallExpressionImpl implements G
|
||||
if (implicitCallReference != null) {
|
||||
return implicitCallReference.multiResolve(incompleteCode);
|
||||
}
|
||||
return ((GrReferenceExpression)getInvokedExpression()).multiResolve(incompleteCode);
|
||||
final GrExpression invokedExpression = getInvokedExpression();
|
||||
if (invokedExpression instanceof GrReferenceExpression) {
|
||||
return ((GrReferenceExpression)invokedExpression).multiResolve(incompleteCode);
|
||||
}
|
||||
else {
|
||||
LOG.error("Invoked expression is not a reference expression and there is no implicit call reference: '" + getText() + "'");
|
||||
return GroovyResolveResult.EMPTY_ARRAY;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user