Migrate deprecations in core, compiler, idea, tests
Replacing deprecated Char.toInt() with Char.code and Number.toChar() with Number.toInt().toChar(), where Number is not Int. KT-23451
This commit is contained in:
+1
-1
@@ -131,7 +131,7 @@ abstract class PrimitiveNumberRangeIntrinsicRangeValue(
|
||||
if (isProhibitedCharConstEndValue(step, endCharValue))
|
||||
null
|
||||
else
|
||||
createConstBoundedIntForLoopGenerator(codegen, forExpression, startValue, endCharValue.toInt(), step, isStartInclusive)
|
||||
createConstBoundedIntForLoopGenerator(codegen, forExpression, startValue, endCharValue.code, step, isStartInclusive)
|
||||
}
|
||||
|
||||
is LongValue -> {
|
||||
|
||||
+2
-2
@@ -140,8 +140,8 @@ private fun jsonEscape(value: String): String = buildString {
|
||||
'\r' -> append("\\r")
|
||||
'\"' -> append("\\\"")
|
||||
'\\' -> append("\\\\")
|
||||
else -> if (ch.toInt() < 32) {
|
||||
append("\\u" + Integer.toHexString(ch.toInt()).padStart(4, '0'))
|
||||
else -> if (ch.code < 32) {
|
||||
append("\\u" + Integer.toHexString(ch.code).padStart(4, '0'))
|
||||
}
|
||||
else {
|
||||
append(ch)
|
||||
|
||||
Reference in New Issue
Block a user