diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index 72c766bb082..cb1ce8ed253 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -415,6 +415,7 @@ open class KotlinFileExtractor( private fun extractClassModifiers(c: IrClass, id: Label) { with("class modifiers", c) { + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (c.modality) { Modality.FINAL -> addModifiers(id, "final") Modality.SEALED -> addModifiers(id, "sealed") @@ -2801,6 +2802,7 @@ open class KotlinFileExtractor( private fun extractBody(b: IrBody, callable: Label) { with("body", b) { + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (b) { is IrBlockBody -> extractBlockBody(b, callable) is IrSyntheticBody -> extractSyntheticBody(b, callable) diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt index 83cbec771fc..bb664e711a3 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt @@ -1836,6 +1836,7 @@ open class KotlinUsesExtractor( // Note this function doesn't return a signature because type arguments are never // incorporated into function signatures. + @Suppress("REDUNDANT_ELSE_IN_WHEN") return when (arg) { is IrStarProjection -> { val anyTypeLabel = diff --git a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt index fb39b667575..f4eac03df9d 100644 --- a/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt +++ b/java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt @@ -111,6 +111,7 @@ private fun subProjectedType( } ?: makeTypeProjection(t.substituteTypeArguments(substitutionMap), outerVariance) private fun IrTypeArgument.upperBound(context: IrPluginContext) = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> context.irBuiltIns.anyNType is IrTypeProjection -> @@ -125,6 +126,7 @@ private fun IrTypeArgument.upperBound(context: IrPluginContext) = } private fun IrTypeArgument.lowerBound(context: IrPluginContext) = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> context.irBuiltIns.nothingType is IrTypeProjection -> @@ -209,6 +211,7 @@ fun IrClass.toRawType(): IrType { } fun IrTypeArgument.withQuestionMark(b: Boolean): IrTypeArgument = + @Suppress("REDUNDANT_ELSE_IN_WHEN") when (this) { is IrStarProjection -> this is IrTypeProjection ->