Non-imported extensions from different packages do not shadow each other
This commit is contained in:
@@ -225,7 +225,6 @@ abstract class CompletionSessionBase(protected val configuration: CompletionSess
|
||||
|
||||
protected fun getTopLevelExtensions(): Collection<CallableDescriptor> {
|
||||
val extensions = indicesHelper.getCallableTopLevelExtensions({ prefixMatcher.prefixMatches(it) }, reference!!.expression)
|
||||
//TODO: it filters out too much
|
||||
return ShadowedDeclarationsFilter(bindingContext, moduleDescriptor, project).filterNonImported(extensions, referenceVariants, reference.expression)
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package ppp
|
||||
|
||||
class C {
|
||||
fun foo() {
|
||||
xx<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: { lookupString: "xxx", itemText: "xxx", tailText: "() for Any in dependency1", typeText: "Int" }
|
||||
// EXIST: { lookupString: "xxx", itemText: "xxx", tailText: "() for C in dependency2", typeText: "Int" }
|
||||
// NOTHING_ELSE
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package dependency1
|
||||
|
||||
fun Any.xxx(): Int = 1
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package dependency2
|
||||
|
||||
fun ppp.C.xxx(): Int = 1
|
||||
+6
@@ -113,6 +113,12 @@ public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJ
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MoreSpecificExtensionInDifferentPackage")
|
||||
public void testMoreSpecificExtensionInDifferentPackage() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionInDifferentPackage/");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("MoreSpecificExtensionIsPrivate")
|
||||
public void testMoreSpecificExtensionIsPrivate() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionIsPrivate/");
|
||||
|
||||
Reference in New Issue
Block a user