Add default values to KotlinTypeMapper constructor, remove them from call sites

~
This commit is contained in:
Mikhael Bogdanov
2019-03-05 12:00:55 +01:00
parent cc0c3b1592
commit 20da778046
13 changed files with 33 additions and 53 deletions
@@ -4,9 +4,7 @@ import com.intellij.openapi.project.Project
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.analyzer.AnalysisResult
import org.jetbrains.kotlin.codegen.ClassBuilderMode
import org.jetbrains.kotlin.codegen.state.IncompatibleClassTracker
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper
import org.jetbrains.kotlin.config.JvmTarget
import org.jetbrains.kotlin.config.LanguageVersionSettings
import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl
import org.jetbrains.kotlin.container.ComponentProvider
@@ -61,7 +59,7 @@ class UastAnalysisHandlerExtension : AnalysisHandlerExtension {
val typeMapper = KotlinTypeMapper(
bindingContext, ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, JvmTarget.DEFAULT,
JvmAbi.DEFAULT_MODULE_NAME,
KotlinTypeMapper.LANGUAGE_VERSION_SETTINGS_DEFAULT // TODO use proper LanguageVersionSettings
)
this.typeMapper = typeMapper
@@ -57,9 +57,8 @@ class UastAnalysisHandlerExtension : AnalysisHandlerExtension {
val typeMapper = KotlinTypeMapper(
bindingContext, ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, JvmTarget.DEFAULT,
KotlinTypeMapper.LANGUAGE_VERSION_SETTINGS_DEFAULT, // TODO use proper LanguageVersionSettings
false
JvmAbi.DEFAULT_MODULE_NAME,
KotlinTypeMapper.LANGUAGE_VERSION_SETTINGS_DEFAULT // TODO use proper LanguageVersionSettings
)
this.typeMapper = typeMapper
return typeMapper