diff --git a/java/java-tests/java-tests.iml b/java/java-tests/java-tests.iml
index e67b253adb36..8f933bc5bdf8 100644
--- a/java/java-tests/java-tests.iml
+++ b/java/java-tests/java-tests.iml
@@ -46,5 +46,6 @@
+
\ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy b/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy
index 436c29509505..5e1de973f184 100644
--- a/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy
+++ b/java/java-tests/testSrc/com/intellij/navigation/ChooseByNameTest.groovy
@@ -27,6 +27,7 @@ import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
import com.intellij.util.Consumer
import com.intellij.util.concurrency.Semaphore
import org.jetbrains.annotations.NotNull
+import org.jetbrains.plugins.groovy.lang.psi.GroovyFile
/**
* @author peter
*/
@@ -287,6 +288,15 @@ class Intf {
assert getPopupElements(new GotoSymbolModel2(project), 'Su.xpai', false) == [sub]
}
+ public void "test groovy script class with non-identifier name"() {
+ GroovyFile file1 = myFixture.addFileToProject('foo.groovy', '')
+ myFixture.addFileToProject('foo-bar.groovy', '')
+
+ def clazz
+ edt { clazz = file1.scriptClass }
+ assert getPopupElements(new GotoSymbolModel2(project), 'foo', false) == [clazz]
+ }
+
private List