Completion fails with exception "Toplevel class has no fqName" (KT-5119)
Groovy scripts files can create PsiClasses with null qualfied names (getQualifiedName()) and names (getName()). #KT-5119 Fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
class TestKotlin
|
||||
|
||||
val test = Test<caret>
|
||||
|
||||
// EXIST: TestKotlin
|
||||
// EXIST: TestGroovyNormal
|
||||
// EXIST: TestGroovyScript
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class TestGroovyNormal {
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
def method() {
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class TestGroovyScript {
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package foo
|
||||
|
||||
class TestKotlin
|
||||
|
||||
val test = Test<caret>
|
||||
|
||||
// EXIST: TestKotlin
|
||||
// EXIST: TestGroovyNormal
|
||||
// EXIST: TestGroovyScript
|
||||
// INVOCATION_COUNT: 2
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class TestGroovyNormal {
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
def method() {
|
||||
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
public class TestGroovyScript {
|
||||
}
|
||||
@@ -76,6 +76,16 @@ public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJ
|
||||
doTest("idea/testData/completion/basic/multifile/ExtensionOnNullable");
|
||||
}
|
||||
|
||||
@TestMetadata("GroovyClassNameCompletionFromDefaultPackage")
|
||||
public void testGroovyClassNameCompletionFromDefaultPackage() throws Exception {
|
||||
doTest("idea/testData/completion/basic/multifile/GroovyClassNameCompletionFromDefaultPackage");
|
||||
}
|
||||
|
||||
@TestMetadata("GroovyClassNameCompletionFromNonDefaultPackage")
|
||||
public void testGroovyClassNameCompletionFromNonDefaultPackage() throws Exception {
|
||||
doTest("idea/testData/completion/basic/multifile/GroovyClassNameCompletionFromNonDefaultPackage");
|
||||
}
|
||||
|
||||
@TestMetadata("InImportedFunctionLiteralParameter")
|
||||
public void testInImportedFunctionLiteralParameter() throws Exception {
|
||||
doTest("idea/testData/completion/basic/multifile/InImportedFunctionLiteralParameter");
|
||||
|
||||
Reference in New Issue
Block a user