diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/BasicCompletionSession.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/BasicCompletionSession.kt index b30a60b94d1..17aa24f0de8 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/BasicCompletionSession.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/BasicCompletionSession.kt @@ -199,7 +199,7 @@ class BasicCompletionSession(configuration: CompletionSessionConfiguration, completeKeywords() // getting root packages from scope is very slow so we do this in alternative way - if (callTypeAndReceiver.receiver == null && (descriptorKindFilter?.kindMask ?: 0).and(DescriptorKindFilter.PACKAGES_MASK) != 0) { + if (callTypeAndReceiver.receiver == null && callTypeAndReceiver.callType.descriptorKindFilter.kindMask.and(DescriptorKindFilter.PACKAGES_MASK) != 0) { //TODO: move this code somewhere else? val packageNames = PackageIndexUtil.getSubPackageFqNames(FqName.ROOT, originalSearchScope, project, prefixMatcher.asNameFilter()) .toMutableSet() diff --git a/idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt b/idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt index 6ce20f575b7..fee6e7ee827 100644 --- a/idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt +++ b/idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt @@ -55,3 +55,6 @@ abstract class AbstractClass // ABSENT: class.java // EXIST: { itemText: "funWithFunctionParameter", tailText: "(p: () -> Unit) ()", attributes: "" } // ABSENT: genericFun + +// ABSENT: "kotlin" +// ABSENT: "java"