Deprecate Char-to-Number conversions in stdlib (JVM and JS)
- Int.toChar was left non-deprecated because the replacement is not intrinsic yet. - Number.toChar was left non-deprecated because otherwise the deprecation propagates to the override, Int.toChar. KT-23451
This commit is contained in:
@@ -128,8 +128,8 @@ class NumbersTest {
|
||||
}
|
||||
|
||||
@Test fun charMinMaxValues() {
|
||||
assertTrue(Char.MIN_VALUE.toInt() == 0)
|
||||
assertTrue(Char.MAX_VALUE.toInt() > 0)
|
||||
assertTrue(Char.MIN_VALUE.code == 0)
|
||||
assertTrue(Char.MAX_VALUE.code > 0)
|
||||
|
||||
// overflow behavior
|
||||
expect(Char.MIN_VALUE) { Char.MAX_VALUE + one }
|
||||
|
||||
Reference in New Issue
Block a user