Introduce KotlinMetadataFinder#hasMetadataPackage
Before creating a MetadataPackageFragment, check that the corresponding directory (across the classpath) contains at least one .kotlin_metadata file. Otherwise we're creating packages for every simple name queried during the resolution and sometimes prefer a (empty) package to the existing class, for example when the latter class is star-imported
This commit is contained in:
+3
@@ -39,6 +39,9 @@ class ReflectKotlinClassFinder(private val classLoader: ClassLoader) : KotlinCla
|
||||
// TODO
|
||||
override fun findMetadata(classId: ClassId): InputStream? = null
|
||||
|
||||
// TODO
|
||||
override fun hasMetadataPackage(fqName: FqName): Boolean = false
|
||||
|
||||
// TODO: load built-ins from classLoader
|
||||
override fun findBuiltInsData(packageFqName: FqName): InputStream? = null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user