Deprecate simplification of complex boolean constant expressions in whens and loops
^KT-39883 In Progress
This commit is contained in:
committed by
teamcityserver
parent
8a2e0cedf9
commit
05883afc0a
@@ -1,4 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// LANGUAGE: +ProhibitSimplificationOfNonTrivialConstBooleanExpressions
|
||||
fun test() {
|
||||
@ann
|
||||
while (2 < 1) {}
|
||||
@@ -10,4 +11,4 @@ fun test() {
|
||||
for (i in 1..2) {}
|
||||
}
|
||||
|
||||
annotation class ann
|
||||
annotation class ann
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
|
||||
fun test() {
|
||||
@ann
|
||||
while (2 > 1) {}
|
||||
@@ -9,4 +10,4 @@ fun test() {
|
||||
for (i in 1..2) {}
|
||||
}
|
||||
|
||||
annotation class ann
|
||||
annotation class ann
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
|
||||
fun test() {
|
||||
@ann
|
||||
while (2 > 1) {}
|
||||
while (<!NON_TRIVIAL_BOOLEAN_CONSTANT!>2 > 1<!>) {}
|
||||
|
||||
@ann
|
||||
<!UNREACHABLE_CODE!>do {} while (2 > 1)<!>
|
||||
<!UNREACHABLE_CODE!>do {} while (<!NON_TRIVIAL_BOOLEAN_CONSTANT!>2 > 1<!>)<!>
|
||||
|
||||
@ann
|
||||
<!UNREACHABLE_CODE!>for (i in 1..2) {}<!>
|
||||
}
|
||||
|
||||
annotation class ann
|
||||
annotation class ann
|
||||
|
||||
Reference in New Issue
Block a user