From e1f72d60dc3674385a6946bbdd54913bf82ab0bb Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Sat, 21 Jan 2023 10:34:14 +0100 Subject: [PATCH] [Wasm] stdlib API: Mark primitives constructor properties as private These are implementation detail and were not meant to be public --- .../codegen/boxInline/property/simpleExtension.kt | 1 - libraries/stdlib/wasm/builtins/kotlin/Char.kt | 2 +- libraries/stdlib/wasm/builtins/kotlin/Primitives.kt | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/compiler/testData/codegen/boxInline/property/simpleExtension.kt b/compiler/testData/codegen/boxInline/property/simpleExtension.kt index bcd943541ef..6dc5bdeaf59 100644 --- a/compiler/testData/codegen/boxInline/property/simpleExtension.kt +++ b/compiler/testData/codegen/boxInline/property/simpleExtension.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: WASM // FILE: 1.kt package test diff --git a/libraries/stdlib/wasm/builtins/kotlin/Char.kt b/libraries/stdlib/wasm/builtins/kotlin/Char.kt index 340934f97c4..24d9d9cbbe0 100644 --- a/libraries/stdlib/wasm/builtins/kotlin/Char.kt +++ b/libraries/stdlib/wasm/builtins/kotlin/Char.kt @@ -15,7 +15,7 @@ import kotlin.wasm.internal.* */ @WasmAutoboxed @Suppress("NOTHING_TO_INLINE") -public class Char private constructor(public val value: Char) : Comparable { +public class Char private constructor(private val value: Char) : Comparable { /** * Compares this value with the specified value for order. * diff --git a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt index 00fa95c818d..cf4c2556462 100644 --- a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt +++ b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt @@ -16,7 +16,7 @@ import kotlin.wasm.internal.* * Represents a 8-bit signed integer. */ @WasmAutoboxed -public class Byte private constructor(public val value: Byte) : Number(), Comparable { +public class Byte private constructor(private val value: Byte) : Number(), Comparable { public companion object { /** * A constant holding the minimum value an instance of Byte can have. @@ -382,7 +382,7 @@ public class Byte private constructor(public val value: Byte) : Number(), Compar * Represents a 16-bit signed integer. */ @WasmAutoboxed -public class Short private constructor(public val value: Short) : Number(), Comparable { +public class Short private constructor(private val value: Short) : Number(), Comparable { public companion object { /** * A constant holding the minimum value an instance of Short can have. @@ -760,7 +760,7 @@ public class Short private constructor(public val value: Short) : Number(), Comp * Represents a 32-bit signed integer. */ @WasmAutoboxed -public class Int private constructor(val value: Int) : Number(), Comparable { +public class Int private constructor(private val value: Int) : Number(), Comparable { public companion object { /** @@ -1210,7 +1210,7 @@ public class Int private constructor(val value: Int) : Number(), Comparable * Represents a 64-bit signed integer. */ @WasmAutoboxed -public class Long private constructor(val value: Long) : Number(), Comparable { +public class Long private constructor(private val value: Long) : Number(), Comparable { public companion object { /** @@ -1643,7 +1643,7 @@ public class Long private constructor(val value: Long) : Number(), Comparable { +public class Float private constructor(private val value: Float) : Number(), Comparable { public companion object { /** @@ -1983,7 +1983,7 @@ public class Float private constructor(public val value: Float) : Number(), Comp * Represents a double-precision 64-bit IEEE 754 floating point number. */ @WasmAutoboxed -public class Double private constructor(public val value: Double) : Number(), Comparable { +public class Double private constructor(private val value: Double) : Number(), Comparable { public companion object { /**