[Injection] Minor: inline configureModule overload without trace

This commit is contained in:
Dmitry Savvinov
2019-03-13 10:47:49 +03:00
parent b81b388b33
commit eb155dcf3b
2 changed files with 4 additions and 12 deletions
@@ -47,13 +47,15 @@ import org.jetbrains.kotlin.types.expressions.LocalLazyDeclarationResolver
fun StorageComponentContainer.configureModule(
moduleContext: ModuleContext,
platform: TargetPlatform,
compilerServices: PlatformDependentCompilerServices
compilerServices: PlatformDependentCompilerServices,
trace: BindingTrace
) {
useInstance(moduleContext)
useInstance(moduleContext.module)
useInstance(moduleContext.project)
useInstance(moduleContext.storageManager)
useInstance(moduleContext.module.builtIns)
useInstance(trace)
useInstance(platform)
useInstance(compilerServices)
@@ -80,16 +82,6 @@ private fun StorageComponentContainer.configurePlatformIndependentComponents() {
useImpl<ClassicTypeSystemContextForCS>()
}
fun StorageComponentContainer.configureModule(
moduleContext: ModuleContext,
platform: TargetPlatform,
compilerServices: PlatformDependentCompilerServices,
trace: BindingTrace
) {
configureModule(moduleContext, platform, compilerServices)
useInstance(trace)
}
fun createContainerForBodyResolve(
moduleContext: ModuleContext,
bindingTrace: BindingTrace,
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.types.expressions.FakeCallResolver
fun createContainerForTests(project: Project, module: ModuleDescriptor): ContainerForTests {
return ContainerForTests(createContainer("Tests", JvmPlatformCompilerServices) {
configureModule(ModuleContext(module, project),
JvmPlatforms.defaultJvmPlatform, JvmPlatformCompilerServices)
JvmPlatforms.defaultJvmPlatform, JvmPlatformCompilerServices, BindingTraceContext())
useInstance(LanguageVersionSettingsImpl.DEFAULT)
useImpl<SubstitutingScopeProviderImpl>()
useImpl<AnnotationResolverImpl>()