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,3 +1,4 @@
|
||||
// LANGUAGE: -ProhibitSimplificationOfNonTrivialConstBooleanExpressions
|
||||
fun unreachable() {}
|
||||
|
||||
fun a() {
|
||||
@@ -13,11 +14,11 @@ fun b() {
|
||||
}
|
||||
|
||||
fun c() {
|
||||
do {} while (1 == 1)
|
||||
do {} while (<!NON_TRIVIAL_BOOLEAN_CONSTANT!>1 == 1<!>)
|
||||
}
|
||||
|
||||
fun d() {
|
||||
while (2 == 2) {}
|
||||
while (<!NON_TRIVIAL_BOOLEAN_CONSTANT!>2 == 2<!>) {}
|
||||
}
|
||||
|
||||
fun use(arg: Any) = arg
|
||||
@@ -52,4 +53,4 @@ fun h(): Int {
|
||||
while (true) {
|
||||
if (true) return 12
|
||||
}
|
||||
} // should work
|
||||
} // should work
|
||||
|
||||
Reference in New Issue
Block a user