[K2] Allow using simple boolean expressions in constant position
Such behavior is not the same as in K1, but it is more consistent. #KT-64400 Fixed
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
const val INT = 0
|
||||
const val LONG = 0L
|
||||
|
||||
const val compareInt1 = 1 < 2
|
||||
const val compareInt2 = 1 <= 3
|
||||
const val compareInt3 = 1 > 4
|
||||
const val compareInt4 = 1 >= 5
|
||||
|
||||
const val compareInt5 = INT < 2
|
||||
const val compareInt6 = INT <= 3
|
||||
const val compareInt7 = INT > 4
|
||||
const val compareInt8 = INT >= 5
|
||||
|
||||
const val compareLong1 = 1L < 2L
|
||||
const val compareLong2 = 1L <= 3L
|
||||
const val compareLong3 = 1L > 4L
|
||||
const val compareLong4 = 1L >= 5L
|
||||
|
||||
const val compareLong5 = LONG < 2L
|
||||
const val compareLong6 = LONG <= 3L
|
||||
const val compareLong7 = LONG > 4L
|
||||
const val compareLong8 = LONG >= 5L
|
||||
Reference in New Issue
Block a user