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:
@@ -47,7 +47,7 @@ class StringEncodingTest {
|
||||
|
||||
// https://youtrack.jetbrains.com/issue/KT-31614
|
||||
private fun string(vararg codeUnits: Int): String {
|
||||
return buildString { codeUnits.forEach { append(it.toChar()) } }
|
||||
return buildString { codeUnits.forEach { append(Char(it)) } }
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user