Get rid of ModuleDescriptor#defaultImports, use DefaultImportProvider
This commit is contained in:
+2
-4
@@ -57,7 +57,6 @@ import org.jetbrains.kotlin.platform.JavaToKotlinClassMap;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
import org.jetbrains.kotlin.resolve.BindingTraceContext;
|
||||
import org.jetbrains.kotlin.resolve.TargetPlatform;
|
||||
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform;
|
||||
import org.jetbrains.kotlin.resolve.lazy.KotlinCodeAnalyzer;
|
||||
import org.jetbrains.kotlin.resolve.lazy.ResolveSession;
|
||||
import org.jetbrains.kotlin.resolve.lazy.declarations.FileBasedDeclarationProviderFactory;
|
||||
@@ -236,9 +235,8 @@ public class SourceNavigationHelper {
|
||||
@NotNull Collection<KtNamedDeclaration> candidates,
|
||||
@NotNull Project project
|
||||
) {
|
||||
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
|
||||
project, Name.special("<library module>"), JvmPlatform.INSTANCE.getDefaultImports(), DefaultBuiltIns.getInstance()
|
||||
);
|
||||
MutableModuleContext newModuleContext =
|
||||
ContextKt.ContextForNewModule(project, Name.special("<library module>"), DefaultBuiltIns.getInstance());
|
||||
|
||||
newModuleContext.setDependencies(newModuleContext.getModule(), newModuleContext.getModule().getBuiltIns().getBuiltInsModule());
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ abstract class DeserializerForDecompilerBase(
|
||||
protected fun createDummyPackageFragment(fqName: FqName): MutablePackageFragmentDescriptor =
|
||||
MutablePackageFragmentDescriptor(moduleDescriptor, fqName)
|
||||
|
||||
private fun createDummyModule(name: String) = ModuleDescriptorImpl(Name.special("<$name>"), storageManager, emptyList(), builtIns)
|
||||
private fun createDummyModule(name: String) = ModuleDescriptorImpl(Name.special("<$name>"), storageManager, builtIns)
|
||||
|
||||
init {
|
||||
moduleDescriptor.initialize(packageFragmentProvider)
|
||||
|
||||
Reference in New Issue
Block a user