JS: fix boxed char with latest changes in compiler
This commit is contained in:
@@ -132,26 +132,26 @@ internal fun newThrowable(message: String?, cause: Throwable?): Throwable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JsName("BoxedChar")
|
@JsName("BoxedChar")
|
||||||
internal class BoxedChar(val c: Char) : Comparable<Char> {
|
internal class BoxedChar(val c: Int) : Comparable<Int> {
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
return other is BoxedChar && c == other.c
|
return other is BoxedChar && c == other.c
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return c.toInt()
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return c.toString()
|
return js("this.c").unsafeCast<Char>().toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun compareTo(other: Char): Int {
|
override fun compareTo(other: Int): Int {
|
||||||
return c - other
|
return js("this.c - other").unsafeCast<Int>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsName("valueOf")
|
@JsName("valueOf")
|
||||||
public fun valueOf(): Int {
|
public fun valueOf(): Int {
|
||||||
return js("this.c")
|
return c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user