提交 a07e1640 编写于 作者: S svtk

KT-955 Unable to import a Kotlin package into a Kotlin file with no package header

上级 8e859628
......@@ -585,6 +585,12 @@ public class JavaDescriptorResolver {
}
public NamespaceDescriptor resolveNamespace(String qualifiedName) {
// First, let's check that there is no Kotlin package:
NamespaceDescriptor kotlinNamespaceDescriptor = semanticServices.getKotlinNamespaceDescriptor(qualifiedName);
if (kotlinNamespaceDescriptor != null) {
return kotlinNamespaceDescriptor;
}
PsiPackage psiPackage = findPackage(qualifiedName);
if (psiPackage == null) {
PsiClass psiClass = findClass(qualifiedName);
......
//FILE:a.kt
//KT-955 Unable to import a Kotlin package into a Kotlin file with no package header
//+JDK
package foo
fun f() {}
//FILE:b.kt
//+JDK
import foo.*
val m = f() // unresolved
//FILE:c.kt
//+JDK
package java.util
fun bar() {}
//FILE:d.kt
//+JDK
import java.util.*
val r = bar()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册