Refactoring: remove ModuleResolverProvider, inline createModuleResolverProvider
This commit is contained in:
@@ -62,6 +62,7 @@ abstract class ResolverForProject<M : ModuleInfo> {
|
||||
|
||||
abstract val name: String
|
||||
abstract val allModules: Collection<M>
|
||||
abstract val builtIns: KotlinBuiltIns
|
||||
|
||||
override fun toString() = name
|
||||
}
|
||||
@@ -77,6 +78,7 @@ class EmptyResolverForProject<M : ModuleInfo> : ResolverForProject<M>() {
|
||||
override fun descriptorForModule(moduleInfo: M) = diagnoseUnknownModuleInfo(listOf(moduleInfo))
|
||||
override val allModules: Collection<M> = listOf()
|
||||
override fun diagnoseUnknownModuleInfo(infos: List<ModuleInfo>) = throw IllegalStateException("Should not be called for $infos")
|
||||
override val builtIns get() = DefaultBuiltIns.Instance
|
||||
}
|
||||
|
||||
class ResolverForProjectImpl<M : ModuleInfo>(
|
||||
@@ -87,7 +89,7 @@ class ResolverForProjectImpl<M : ModuleInfo>(
|
||||
private val modulesContent: (M) -> ModuleContent,
|
||||
private val platformParameters: PlatformAnalysisParameters,
|
||||
private val targetEnvironment: TargetEnvironment = CompilerEnvironment,
|
||||
private val builtIns: KotlinBuiltIns = DefaultBuiltIns.Instance,
|
||||
override val builtIns: KotlinBuiltIns = DefaultBuiltIns.Instance,
|
||||
private val delegateResolver: ResolverForProject<M> = EmptyResolverForProject(),
|
||||
private val packagePartProviderFactory: (M, ModuleContent) -> PackagePartProvider = { _, _ -> PackagePartProvider.Empty },
|
||||
private val firstDependency: M? = null,
|
||||
|
||||
Reference in New Issue
Block a user