[Generator] Rename additionalDoc, put its content before annotations

This commit is contained in:
Ilya Gorbunov
2023-08-28 21:20:38 +02:00
committed by Space Team
parent cd392ebe69
commit 60bbd08569
6 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -106,10 +106,10 @@ internal constructor(private val value: Int) : Comparable<Char> {
@kotlin.internal.IntrinsicConstEvaluation
public fun toDouble(): Double = value.toDouble()
// TODO implicit usages of toString and valueOf must be covered in DCE
@kotlin.internal.IntrinsicConstEvaluation
@Suppress("JS_NAME_PROHIBITED_FOR_OVERRIDE")
@JsName("toString")
// TODO implicit usages of toString and valueOf must be covered in DCE
public override fun toString(): String {
return js("String").fromCharCode(value).unsafeCast<String>()
}
@@ -1578,13 +1578,13 @@ public class Long internal constructor(internal val low: Int, internal val high:
public override fun hashCode(): Int = hashCode(this)
@JsName("valueOf")
// This method is used by JavaScript to convert objects of type Long to primitives.
// This is essential for the JavaScript interop.
// JavaScript functions that expect `number` are imported in Kotlin as expecting `kotlin.Number`
// (in our standard library, and also in user projects if they use Dukat for generating external declarations).
// Because `kotlin.Number` is a supertype of `Long` too, there has to be a way for JS to know how to handle Longs.
// See KT-50202
@JsName("valueOf")
internal fun valueOf(): Double = toDouble()
}