KT-10619 Wrong completion after package name in annotation
#KT-10619 Fixed
This commit is contained in:
+2
@@ -272,6 +272,7 @@ class BasicCompletionSession(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (callTypeAndReceiver.receiver == null) {
|
||||||
val classKindFilter: ((ClassKind) -> Boolean)?
|
val classKindFilter: ((ClassKind) -> Boolean)?
|
||||||
when (callTypeAndReceiver) {
|
when (callTypeAndReceiver) {
|
||||||
is CallTypeAndReceiver.ANNOTATION -> classKindFilter = { it == ClassKind.ANNOTATION_CLASS }
|
is CallTypeAndReceiver.ANNOTATION -> classKindFilter = { it == ClassKind.ANNOTATION_CLASS }
|
||||||
@@ -287,6 +288,7 @@ class BasicCompletionSession(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun isStartOfExtensionReceiverFor(): KtCallableDeclaration? {
|
private fun isStartOfExtensionReceiverFor(): KtCallableDeclaration? {
|
||||||
val userType = nameExpression!!.parent as? KtUserType ?: return null
|
val userType = nameExpression!!.parent as? KtUserType ?: return null
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
@kotlin.concurrent.<caret>
|
||||||
|
|
||||||
|
// INVOCATION_COUNT: 2
|
||||||
|
// ABSENT: Deprecated
|
||||||
|
// ABSENT: Volatile
|
||||||
+6
@@ -791,6 +791,12 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Annotations extends AbstractJSBasicCompletionTest {
|
public static class Annotations extends AbstractJSBasicCompletionTest {
|
||||||
|
@TestMetadata("AfterPackageName.kt")
|
||||||
|
public void testAfterPackageName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInAnnotations() throws Exception {
|
public void testAllFilesPresentInAnnotations() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -791,6 +791,12 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT
|
|||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Annotations extends AbstractJvmBasicCompletionTest {
|
public static class Annotations extends AbstractJvmBasicCompletionTest {
|
||||||
|
@TestMetadata("AfterPackageName.kt")
|
||||||
|
public void testAfterPackageName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInAnnotations() throws Exception {
|
public void testAllFilesPresentInAnnotations() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user