[K/N] Stdlib: warnings as errors
Fix or suppress warnings in Native stdlib.
This commit is contained in:
@@ -404,8 +404,6 @@ val stdLibSrcDirs = interopSrcDirs + listOf(
|
||||
project(":kotlin-stdlib-common").file("../native-wasm/src/")
|
||||
)
|
||||
|
||||
val args = listOf<String>(/* -Werror (TODO: check) */)
|
||||
|
||||
lateinit var stdlibBuildTask: TaskProvider<Task>
|
||||
|
||||
konanArtifacts {
|
||||
@@ -418,8 +416,9 @@ konanArtifacts {
|
||||
noDefaultLibs(true)
|
||||
noEndorsedLibs(true)
|
||||
|
||||
extraOpts(args + project.globalBuildArgs)
|
||||
extraOpts(project.globalBuildArgs)
|
||||
extraOpts(
|
||||
"-Werror",
|
||||
"-module-name", "stdlib",
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-opt-in=kotlin.contracts.ExperimentalContracts",
|
||||
|
||||
@@ -26,7 +26,7 @@ enum class FutureState(val value: Int) {
|
||||
* Class representing abstract computation, whose result may become available in the future.
|
||||
*/
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
public inline class Future<T> @PublishedApi internal constructor(val id: Int) {
|
||||
public value class Future<T> @PublishedApi internal constructor(val id: Int) {
|
||||
/**
|
||||
* Blocks execution until the future is ready.
|
||||
*
|
||||
|
||||
@@ -27,7 +27,7 @@ import kotlinx.cinterop.*
|
||||
* Class representing worker.
|
||||
*/
|
||||
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
|
||||
public inline class Worker @PublishedApi internal constructor(val id: Int) {
|
||||
public value class Worker @PublishedApi internal constructor(val id: Int) {
|
||||
companion object {
|
||||
/**
|
||||
* Start new scheduling primitive, such as thread, to accept new tasks via `execute` interface.
|
||||
|
||||
@@ -12,6 +12,7 @@ internal class KClassImpl<T : Any>(private val typeInfo: NativePtr) : KClass<T>
|
||||
|
||||
@ExportForCompiler
|
||||
@ConstantConstructorIntrinsic("KCLASS_IMPL")
|
||||
@Suppress("UNREACHABLE_CODE")
|
||||
constructor() : this(TODO("This is intrinsic constructor and it shouldn't be used directly"))
|
||||
|
||||
// TODO: consider replacing '$' by another delimeter that can't be used in class name specified with backticks (``)
|
||||
|
||||
@@ -57,6 +57,7 @@ internal class KTypeImpl<T>(
|
||||
|
||||
@ExportForCompiler
|
||||
@ConstantConstructorIntrinsic("KTYPE_IMPL")
|
||||
@Suppress("UNREACHABLE_CODE")
|
||||
constructor() : this(null, TODO("This is intrinsic constructor and it shouldn't be used directly"), false)
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
|
||||
@@ -8,7 +8,7 @@ package kotlin.native.internal.test
|
||||
internal class GTestLogger : TestLoggerWithStatistics() {
|
||||
|
||||
private val Collection<TestSuite>.totalTestsNotIgnored: Int
|
||||
get() = asSequence().filter { !it.ignored }.sumBy { it.testCases.values.count { !it.ignored } }
|
||||
get() = asSequence().filter { !it.ignored }.sumOf { it.testCases.values.count { !it.ignored } }
|
||||
|
||||
private val Collection<TestSuite>.totalNotIgnored: Int
|
||||
get() = filter { !it.ignored }.size
|
||||
|
||||
Reference in New Issue
Block a user