[Wasm] stdlib NFC: Fix or suppress remaining warnings
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("UNUSED_PARAMETER")
|
||||
|
||||
package kotlin
|
||||
|
||||
import kotlin.wasm.internal.*
|
||||
@@ -56,7 +58,7 @@ public class Boolean private constructor(private val value: Boolean) : Comparabl
|
||||
return if (other !is Boolean) {
|
||||
false
|
||||
} else {
|
||||
this === (other as Boolean)
|
||||
wasm_i32_eq(this.toInt(), other.toInt())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Char private constructor(public val value: Char) : Comparable<Char>
|
||||
|
||||
public override fun equals(other: Any?): Boolean {
|
||||
if (other is Char)
|
||||
return this === (other as Char)
|
||||
return wasm_i32_eq(this.toInt(), other.toInt())
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
@@ -87,5 +87,5 @@ public inline fun <reified T : Enum<T>> enumValues(): Array<T>
|
||||
* Returns an enum entry with specified name.
|
||||
*/
|
||||
@SinceKotlin("1.1")
|
||||
@Suppress("NON_MEMBER_FUNCTION_NO_BODY")
|
||||
@Suppress("NON_MEMBER_FUNCTION_NO_BODY", "UNUSED_PARAMETER")
|
||||
public inline fun <reified T : Enum<T>> enumValueOf(name: String): T
|
||||
@@ -5,7 +5,7 @@
|
||||
@file:Suppress(
|
||||
"OVERRIDE_BY_INLINE",
|
||||
"NOTHING_TO_INLINE",
|
||||
"unused"
|
||||
"unused", "UNUSED_PARAMETER"
|
||||
)
|
||||
|
||||
package kotlin
|
||||
|
||||
@@ -127,6 +127,7 @@ public class String internal @WasmPrimitiveConstructor constructor(
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
internal inline fun WasmCharArray.createString(): String =
|
||||
String(null, this.len(), this)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user