Stabilize Char-to-Int conversions KT-45874

This commit is contained in:
Ilya Gorbunov
2021-04-02 20:14:36 +03:00
parent c5f06d6e3f
commit 8b85bae020
11 changed files with 70 additions and 71 deletions
+3 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -12,9 +12,8 @@ package kotlin
// TODO: KT-35100
//public inline class Char internal constructor (val value: Int) : Comparable<Char> {
public class Char
@OptIn(ExperimentalUnsignedTypes::class)
@ExperimentalStdlibApi
@SinceKotlin("1.4")
@SinceKotlin("1.5")
@WasExperimental(ExperimentalStdlibApi::class)
constructor(code: UShort) : Comparable<Char> {
private val value: Int = code.toInt()