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:
@@ -149,16 +149,16 @@ class AbstractCollectionsTest {
|
||||
@Test
|
||||
fun abstractMutableMap() {
|
||||
val map = MutMap()
|
||||
for (e in 'a'..'z') map[e.toString()] = e.toInt()
|
||||
for (e in 'a'..'z') map[e.toString()] = e.code
|
||||
assertEquals(26, map.size)
|
||||
|
||||
map.remove("a")
|
||||
map.keys.remove("b")
|
||||
map.keys.removeAll { it == "c" }
|
||||
|
||||
map.values.remove('d'.toInt())
|
||||
map.values.remove('d'.code)
|
||||
assertTrue(map.containsKey("e"))
|
||||
assertTrue(map.containsValue('f'.toInt()))
|
||||
assertTrue(map.containsValue('f'.code))
|
||||
|
||||
compare(map.storage, map) {
|
||||
mapBehavior()
|
||||
|
||||
Reference in New Issue
Block a user