[K2] Properly check if binary logical expression is constant

This commit is contained in:
Ivan Kylchik
2023-12-15 15:51:16 +01:00
committed by Space Team
parent f8e9e99d87
commit 0d127f6daf
12 changed files with 150 additions and 0 deletions
@@ -0,0 +1,8 @@
// LANGUAGE: +ProhibitSimplificationOfNonTrivialConstBooleanExpressions
val nonConstBool = true
const val constBool = false
const val s1 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>""" ${ true && false } """<!>
const val s2 = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>""" ${ nonConstBool && false } """<!>
const val s3 = """ ${ constBool && false } """