Added test for second press completion for inaccessible
This commit is contained in:
@@ -66,7 +66,6 @@ public class ReferenceVariantsHelper(
|
|||||||
val variants = getReferenceVariantsNoVisibilityFilter(expression, kindFilter, useRuntimeReceiverType, nameFilter)
|
val variants = getReferenceVariantsNoVisibilityFilter(expression, kindFilter, useRuntimeReceiverType, nameFilter)
|
||||||
.filter(visibilityFilter)
|
.filter(visibilityFilter)
|
||||||
return ShadowedDeclarationsFilter(context, moduleDescriptor, project).filter(variants, expression)
|
return ShadowedDeclarationsFilter(context, moduleDescriptor, project).filter(variants, expression)
|
||||||
//TODO: if visibility filter is empty, filter out shadowed can work incorrectly!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getReferenceVariantsNoVisibilityFilter(
|
private fun getReferenceVariantsNoVisibilityFilter(
|
||||||
|
|||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package dependency
|
||||||
|
|
||||||
|
fun Any.xxx(): Int = 1
|
||||||
|
private fun ppp.C.xxx(): Int = 1
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
package ppp
|
||||||
|
|
||||||
|
import dependency.*
|
||||||
|
|
||||||
|
class C
|
||||||
|
|
||||||
|
fun foo(c: C) {
|
||||||
|
c.xx<caret>
|
||||||
|
}
|
||||||
|
|
||||||
|
// we should not include inaccessible extension even on the second completion because the call won't resolve into it anyway
|
||||||
|
// INVOCATION_COUNT: 2
|
||||||
|
// EXIST: { lookupString: "xxx", itemText: "xxx", tailText: "() for Any in dependency", typeText: "Int" }
|
||||||
|
// NOTHING_ELSE
|
||||||
+6
@@ -113,6 +113,12 @@ public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJ
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("MoreSpecificExtensionIsPrivate")
|
||||||
|
public void testMoreSpecificExtensionIsPrivate() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionIsPrivate/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("NoAutoInsertionOfNotImported")
|
@TestMetadata("NoAutoInsertionOfNotImported")
|
||||||
public void testNoAutoInsertionOfNotImported() throws Exception {
|
public void testNoAutoInsertionOfNotImported() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoAutoInsertionOfNotImported/");
|
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoAutoInsertionOfNotImported/");
|
||||||
|
|||||||
Reference in New Issue
Block a user