Remove unused parameters, compiler keys and obsolete code

This commit is contained in:
Mikhael Bogdanov
2018-02-21 18:07:53 +01:00
parent fe45eb2a81
commit 63afd37cdd
10 changed files with 18 additions and 43 deletions
@@ -180,12 +180,11 @@ class ParcelableDeclarationChecker : DeclarationChecker {
}
val typeMapper = KotlinTypeMapper(
bindingContext,
ClassBuilderMode.full(false),
IncompatibleClassTracker.DoNothing,
descriptor.module.name.asString(),
/* isJvm8Target */ false,
/* isJvm8TargetWithDefaults */ false)
bindingContext,
ClassBuilderMode.full(false),
IncompatibleClassTracker.DoNothing,
descriptor.module.name.asString(),
/* isJvm8Target */ false)
for (parameter in primaryConstructor?.valueParameters.orEmpty()) {
checkParcelableClassProperty(parameter, descriptor, diagnosticHolder, typeMapper)
@@ -29,7 +29,8 @@ class IdeaKotlinUastBindingContextProviderService : KotlinUastBindingContextProv
override fun getBindingContext(element: KtElement) = element.analyze(BodyResolveMode.PARTIAL)
override fun getTypeMapper(element: KtElement): KotlinTypeMapper? {
return KotlinTypeMapper(getBindingContext(element), ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false, false)
return KotlinTypeMapper(
getBindingContext(element), ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false)
}
}
@@ -39,8 +39,9 @@ class UastAnalysisHandlerExtension : AnalysisHandlerExtension {
if (typeMapper != null) return typeMapper
val bindingContext = context ?: return null
val typeMapper = KotlinTypeMapper(bindingContext, ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false, false)
val typeMapper = KotlinTypeMapper(
bindingContext, ClassBuilderMode.LIGHT_CLASSES,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false)
this.typeMapper = typeMapper
return typeMapper
}