[FE 1.0] Postpone ProhibitSimplificationOfNonTrivialConstBooleanExpressions till 1.7

^KT-39883
This commit is contained in:
Dmitriy Novozhilov
2021-09-01 10:11:17 +03:00
committed by teamcityserver
parent 97d71dc160
commit 5a5d25d350
4 changed files with 4 additions and 5 deletions
@@ -19,6 +19,6 @@ fun test5(x: Boolean): Boolean {
}
fun test6(): Boolean {
return true.not()
return false
}
@@ -28,5 +28,4 @@ FILE fqName:<root> fileName:/simpleUnaryOperators.kt
FUN name:test6 visibility:public modality:FINAL <> () returnType:kotlin.Boolean
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test6 (): kotlin.Boolean declared in <root>'
CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCL
$this: CONST Boolean type=kotlin.Boolean value=true
CONST Boolean type=kotlin.Boolean value=false
@@ -1 +1 @@
java.lang.IllegalStateException: NO_ELSE_IN_WHEN: 'when' expression must be exhaustive, add necessary 'true', 'false' branches or 'else' branch instead (15,17) in /1.2.kt
java.lang.IllegalStateException: NO_ELSE_IN_WHEN: 'when' expression must be exhaustive, add necessary 'false' branch or 'else' branch instead (15,17) in /1.2.kt
@@ -210,7 +210,6 @@ enum class LanguageFeature(
ProperTypeInferenceConstraintsProcessing(KOTLIN_1_6, kind = BUG_FIX),
ClassTypeParameterAnnotations(KOTLIN_1_6),
SafeCallsAreAlwaysNullable(KOTLIN_1_6),
ProhibitSimplificationOfNonTrivialConstBooleanExpressions(KOTLIN_1_6),
TypeInferenceOnCallsWithSelfTypes(KOTLIN_1_6),
WarnAboutNonExhaustiveWhenOnAlgebraicTypes(KOTLIN_1_6, kind = BUG_FIX),
InstantiationOfAnnotationClasses(KOTLIN_1_6),
@@ -230,6 +229,7 @@ enum class LanguageFeature(
ProhibitInvalidCharsInNativeIdentifiers(KOTLIN_1_7, kind = BUG_FIX),
DefinitelyNotNullTypeParameters(KOTLIN_1_7),
DefinitelyNonNullableTypes(KOTLIN_1_7),
ProhibitSimplificationOfNonTrivialConstBooleanExpressions(KOTLIN_1_7),
// Temporarily disabled, see KT-27084/KT-22379
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),