diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/Array.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/Array.kt index 6e621e97490..b76a78a6312 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/Array.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/Array.kt @@ -26,8 +26,8 @@ public final class Array { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - @Suppress("TYPE_PARAMETER_AS_REIFIED") - public constructor(size: Int, init: (Int) -> T): this(size) { + @Suppress("TYPE_PARAMETER_AS_REIFIED", "WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> T): this(size) { var index = 0 while (index < size) { this[index] = init(index) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/Arrays.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/Arrays.kt index 4f16ffbf415..6a9ce2b21d6 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/Arrays.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/Arrays.kt @@ -31,7 +31,8 @@ public final class ByteArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Byte): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Byte): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -94,7 +95,8 @@ public final class CharArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Char): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Char): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -158,7 +160,8 @@ public final class ShortArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Short): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Short): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -222,7 +225,8 @@ public final class IntArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Int): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Int): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -286,7 +290,8 @@ public final class LongArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Long): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Long): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -350,7 +355,8 @@ public final class FloatArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Float): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Float): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -410,7 +416,8 @@ public final class DoubleArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Double): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Double): this(size) { for (i in 0..size - 1) { this[i] = init(i) } @@ -470,7 +477,8 @@ public final class BooleanArray { * The function [init] is called for each array element sequentially starting from the first one. * It should return the value for an array element given its index. */ - public constructor(size: Int, init: (Int) -> Boolean): this(size) { + @Suppress("WRONG_MODIFIER_TARGET") + public inline constructor(size: Int, init: (Int) -> Boolean): this(size) { for (i in 0..size - 1) { this[i] = init(i) }