[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,12 @@
val nonConstBool = true
const val constBool = false
const val andExpr1 = true && false
const val andExpr2 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>nonConstBool && false<!>
const val andExpr3 = true && constBool
const val andExpr4 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>nonConstBool && constBool<!>
const val orExpr1 = true || false
const val orExpr2 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>nonConstBool || false<!>
const val orExpr3 = true || constBool
const val orExpr4 = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>nonConstBool || constBool<!>