Added hacky checks for accessing compiled functions from our module via package part instead of facade.
#KT-4590 fixed
This commit is contained in:
+7
-2
@@ -38,6 +38,7 @@ import org.jetbrains.jet.lang.types.JetType
|
||||
import org.jetbrains.jet.lang.resolve.java.lazy.descriptors.LazyJavaMemberScope.MethodSignatureData
|
||||
import org.jetbrains.jet.lang.resolve.java.descriptor.SamConstructorDescriptor
|
||||
import org.jetbrains.jet.lang.resolve.name.SpecialNames
|
||||
import org.jetbrains.jet.lang.resolve.kotlin.KotlinJvmBinaryClass
|
||||
|
||||
public abstract class LazyJavaPackageFragmentScope(
|
||||
c: LazyJavaResolverContext,
|
||||
@@ -91,9 +92,13 @@ public class LazyPackageFragmentScopeForJavaPackage(
|
||||
packageFragment: LazyPackageFragmentForJavaPackage
|
||||
) : LazyJavaPackageFragmentScope(c, packageFragment) {
|
||||
|
||||
// TODO: Storing references is a temporary hack until modules infrastructure is implemented.
|
||||
// See JetTypeMapperWithOutDirectories for details
|
||||
public val kotlinBinaryClass: KotlinJvmBinaryClass?
|
||||
= c.kotlinClassFinder.findKotlinClass(PackageClassUtils.getPackageClassFqName(fqName))
|
||||
|
||||
private val deserializedPackageScope = c.storageManager.createLazyValue {
|
||||
val packageClassFqName = PackageClassUtils.getPackageClassFqName(fqName)
|
||||
val kotlinBinaryClass = c.kotlinClassFinder.findKotlinClass(packageClassFqName)
|
||||
val kotlinBinaryClass = kotlinBinaryClass
|
||||
if (kotlinBinaryClass == null)
|
||||
JetScope.EMPTY
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user