diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrIndexPropertyImpl.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrIndexPropertyImpl.java
index 219bf607c1b7..2ce54ad11c7c 100644
--- a/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrIndexPropertyImpl.java
+++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/path/GrIndexPropertyImpl.java
@@ -72,7 +72,10 @@ public class GrIndexPropertyImpl extends GrExpressionImpl implements GrIndexProp
GrExpression selected = getInvokedExpression();
PsiType thisType = selected.getType();
- if (thisType == null) return null;
+ if (thisType == null) {
+ thisType = TypesUtil.getJavaLangObject(this);
+ }
+
GrArgumentList argList = getArgumentList();
@@ -153,7 +156,9 @@ public class GrIndexPropertyImpl extends GrExpressionImpl implements GrIndexProp
GrExpression invoked = getInvokedExpression();
PsiType thisType = invoked.getType();
- if (thisType == null) return GroovyResolveResult.EMPTY_ARRAY;
+ if (thisType == null) {
+ thisType = TypesUtil.getJavaLangObject(this);
+ }
GrArgumentList argList = getArgumentList();
diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrAssignabilityTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrAssignabilityTest.groovy
index 992c5bfccc6b..d5dbb5681728 100644
--- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrAssignabilityTest.groovy
+++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/highlighting/GrAssignabilityTest.groovy
@@ -570,7 +570,7 @@ print i[1]
+print a[1, 2]
''')
}
@@ -632,7 +632,7 @@ i[1] = 2
+a[1, 3] = 2
''')
}
diff --git a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/unresolvedArrayAccess.java b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/unresolvedArrayAccess.java
index bf6515e7cb67..dc65c743da98 100644
--- a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/unresolvedArrayAccess.java
+++ b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/unresolvedArrayAccess.java
@@ -1,2 +1,2 @@
java.lang.Object foo;
-print(foo.getAt(1));
+print(org.codehaus.groovy.runtime.DefaultGroovyMethods.getAt(foo, 1));