Deprecate simplification of complex boolean constant expressions in whens and loops

^KT-39883 In Progress
This commit is contained in:
Dmitriy Novozhilov
2021-06-25 11:40:51 +03:00
committed by teamcityserver
parent 8a2e0cedf9
commit 05883afc0a
36 changed files with 641 additions and 46 deletions
@@ -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