Skip to content

Commit 90dd3b9

Browse files
committed
Kotlin: Silence compilation warnings
1 parent c7d65ef commit 90dd3b9

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ open class KotlinFileExtractor(
415415

416416
private fun extractClassModifiers(c: IrClass, id: Label<out DbClassorinterface>) {
417417
with("class modifiers", c) {
418+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
418419
when (c.modality) {
419420
Modality.FINAL -> addModifiers(id, "final")
420421
Modality.SEALED -> addModifiers(id, "sealed")
@@ -2801,6 +2802,7 @@ open class KotlinFileExtractor(
28012802

28022803
private fun extractBody(b: IrBody, callable: Label<out DbCallable>) {
28032804
with("body", b) {
2805+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
28042806
when (b) {
28052807
is IrBlockBody -> extractBlockBody(b, callable)
28062808
is IrSyntheticBody -> extractSyntheticBody(b, callable)

java/kotlin-extractor/src/main/kotlin/KotlinUsesExtractor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,6 +1836,7 @@ open class KotlinUsesExtractor(
18361836

18371837
// Note this function doesn't return a signature because type arguments are never
18381838
// incorporated into function signatures.
1839+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
18391840
return when (arg) {
18401841
is IrStarProjection -> {
18411842
val anyTypeLabel =

java/kotlin-extractor/src/main/kotlin/utils/TypeSubstitution.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ private fun subProjectedType(
111111
} ?: makeTypeProjection(t.substituteTypeArguments(substitutionMap), outerVariance)
112112

113113
private fun IrTypeArgument.upperBound(context: IrPluginContext) =
114+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
114115
when (this) {
115116
is IrStarProjection -> context.irBuiltIns.anyNType
116117
is IrTypeProjection ->
@@ -125,6 +126,7 @@ private fun IrTypeArgument.upperBound(context: IrPluginContext) =
125126
}
126127

127128
private fun IrTypeArgument.lowerBound(context: IrPluginContext) =
129+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
128130
when (this) {
129131
is IrStarProjection -> context.irBuiltIns.nothingType
130132
is IrTypeProjection ->
@@ -209,6 +211,7 @@ fun IrClass.toRawType(): IrType {
209211
}
210212

211213
fun IrTypeArgument.withQuestionMark(b: Boolean): IrTypeArgument =
214+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
212215
when (this) {
213216
is IrStarProjection -> this
214217
is IrTypeProjection ->

0 commit comments

Comments
 (0)