Skip to content

Commit f5596b2

Browse files
lunakolySpace Team
authored and
Space Team
committed
[FIR] Suppress REDUNDANT_ELSE_IN_WHEN in the code
They can be removed when the IDE plugin updates to include the changes from the previous commits. ^KT-76635
1 parent 07b434f commit f5596b2

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

analysis/analysis-api/src/org/jetbrains/kotlin/analysis/api/renderer/base/annotations/renderers/KaAnnotationUseSiteTargetRenderer.kt

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public interface KaAnnotationUseSiteTargetRenderer {
5959
annotationRenderer: KaAnnotationRenderer,
6060
printer: PrettyPrinter,
6161
) {
62+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
6263
val print = when (owner) {
6364
!is KaCallableSymbol -> return
6465
is KaAnonymousFunctionSymbol -> true

compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/loops/HeaderInfo.kt

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class ProgressionHeaderInfo(
135135
if (progressionType is UnsignedProgressionType) {
136136
// "step" is still signed for unsigned progressions.
137137
val lastValueAsULong = last.constLongValue?.toULong() ?: return@lazy true // If "last" is not a const Number or Char.
138+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
138139
when (direction) {
139140
ProgressionDirection.DECREASING -> {
140141
val constLimitAsULong = progressionType.minValueAsLong.toULong()
@@ -148,6 +149,7 @@ class ProgressionHeaderInfo(
148149
}
149150
} else {
150151
val lastValueAsLong = last.constLongValue ?: return@lazy true // If "last" is not a const Number or Char.
152+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
151153
when (direction) {
152154
ProgressionDirection.DECREASING -> {
153155
val constLimitAsLong = progressionType.minValueAsLong

compiler/light-classes/src/org/jetbrains/kotlin/asJava/classes/ultraLightMembersCreator.kt

+1
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ internal class UltraLightMembersCreator(
387387
val resultName = DescriptorUtils.getJvmName(annotated)
388388
if (resultName !== null || type == MethodType.REGULAR) return resultName
389389

390+
@Suppress("REDUNDANT_ELSE_IN_WHEN")
390391
val propertyAnnotated = when (type) {
391392
MethodType.GETTER -> (annotated as? PropertyDescriptor)?.getter
392393
MethodType.SETTER -> (annotated as? PropertyDescriptor)?.setter

0 commit comments

Comments
 (0)