Suppress code warnings in kotlin-stdlib

This commit is contained in:
Alexander Udalov
2020-08-13 19:13:31 +02:00
parent 5ef4f7df5a
commit da6d904c6e
32 changed files with 62 additions and 18 deletions
@@ -96,7 +96,7 @@ internal fun subSequence(c: CharSequence, startIndex: Int, endIndex: Int): CharS
}
@JsName("captureStack")
internal fun captureStack(baseClass: JsClass<in Throwable>, instance: Throwable) {
internal fun captureStack(@Suppress("UNUSED_PARAMETER") baseClass: JsClass<in Throwable>, instance: Throwable) {
if (js("Error").captureStackTrace) {
// Using uncropped stack traces due to KT-37563.
// Precise stack traces are implemented in JS IR compiler and stdlib
@@ -9,6 +9,8 @@ package kotlin.js
// Used for js.translator/testData/box/number/mulInt32.kt
@library
@JsName("imulEmulated")
@Suppress("UNUSED_PARAMETER")
internal fun imul(x: Int, y: Int): Int = definedExternally
internal inline fun isArrayish(o: dynamic) = js("Kotlin").isArrayish(o)
@Suppress("NOTHING_TO_INLINE")
internal inline fun isArrayish(o: dynamic) = js("Kotlin").isArrayish(o)
@@ -61,6 +61,7 @@ public actual fun Float.toRawBits(): Int = definedExternally
public actual inline fun Float.Companion.fromBits(bits: Int): Float = js("Kotlin").floatFromBits(bits).unsafeCast<Float>()
@Suppress("NOTHING_TO_INLINE")
internal inline fun Long(low: Int, high: Int) = js("Kotlin").Long.fromBits(low, high).unsafeCast<Long>()
internal inline val Long.low: Int get() = this.asDynamic().getLowBits().unsafeCast<Int>()
internal inline val Long.high: Int get() = this.asDynamic().getHighBits().unsafeCast<Int>()
internal inline val Long.high: Int get() = this.asDynamic().getHighBits().unsafeCast<Int>()
@@ -6,7 +6,7 @@
import kotlin.reflect.KClass
@PublishedApi
internal fun <T : Annotation> KClass<*>.findAssociatedObject(annotationClass: KClass<T>): Any? {
internal fun <T : Annotation> KClass<*>.findAssociatedObject(@Suppress("UNUSED_PARAMETER") annotationClass: KClass<T>): Any? {
// This API is not supported in js-v1. Return `null` to be source-compatible with js-ir.
return null
}
}