[K/JS] Use declared upper-bound types for parameters inside inlined functions body, instead of the provided types
This commit is contained in:
@@ -1140,7 +1140,7 @@ public actual fun CharArray.copyOfRange(fromIndex: Int, toIndex: Int): CharArray
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun <T> Array<T>.fill(element: T, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1156,7 +1156,7 @@ public actual fun <T> Array<T>.fill(element: T, fromIndex: Int = 0, toIndex: Int
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1172,7 +1172,7 @@ public actual fun ByteArray.fill(element: Byte, fromIndex: Int = 0, toIndex: Int
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1188,7 +1188,7 @@ public actual fun ShortArray.fill(element: Short, fromIndex: Int = 0, toIndex: I
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1204,7 +1204,7 @@ public actual fun IntArray.fill(element: Int, fromIndex: Int = 0, toIndex: Int =
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1220,7 +1220,7 @@ public actual fun LongArray.fill(element: Long, fromIndex: Int = 0, toIndex: Int
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1236,7 +1236,7 @@ public actual fun FloatArray.fill(element: Float, fromIndex: Int = 0, toIndex: I
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1252,7 +1252,7 @@ public actual fun DoubleArray.fill(element: Double, fromIndex: Int = 0, toIndex:
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
nativeFill(element, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1268,7 +1268,8 @@ public actual fun BooleanArray.fill(element: Boolean, fromIndex: Int = 0, toInde
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun CharArray.fill(element: Char, fromIndex: Int = 0, toIndex: Int = size): Unit {
|
||||
AbstractList.checkRangeIndexes(fromIndex, toIndex, size)
|
||||
nativeFill(element, fromIndex, toIndex);
|
||||
// We need to call [Char.code] here to eliminate Char-boxing with the new JS function inlining logic
|
||||
nativeFill(element.code, fromIndex, toIndex)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user