Native compiler source: replace inline classes by value classes

The former are deprecated.
This commit is contained in:
Svyatoslav Scherbina
2021-03-05 11:44:32 +03:00
committed by Space
parent b45de517c4
commit 27904c0fb9
2 changed files with 4 additions and 3 deletions
@@ -27,7 +27,8 @@ typealias StableObjPtr = StableRef<*>
* Any [StableRef] should be manually [disposed][dispose]
*/
@Suppress("NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS")
public inline class StableRef<out T : Any> @PublishedApi internal constructor(
@kotlin.jvm.JvmInline
public value class StableRef<out T : Any> @PublishedApi internal constructor(
private val stablePtr: COpaquePointer
) {
@@ -105,8 +105,8 @@ private fun IrFunction.typeWithKindAt(index: ParameterIndex) = when (index) {
private fun IrFunction.needBridgeToAt(target: IrFunction, index: ParameterIndex)
= bridgeDirectionToAt(target, index).kind != BridgeDirectionKind.NONE
@Suppress("EXPERIMENTAL_FEATURE_WARNING")
private inline class ParameterIndex(val index: Int) {
@JvmInline
private value class ParameterIndex(val index: Int) {
companion object {
val RETURN_INDEX = ParameterIndex(0)
val DISPATCH_RECEIVER_INDEX = ParameterIndex(1)