[IR] Fix mutable shared reference of MFVC type

Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
This commit is contained in:
Evgeniy.Zhelenskiy
2023-01-28 01:44:01 +01:00
committed by Space Team
parent 752d6505e9
commit 19424702e0
8 changed files with 78 additions and 10 deletions
@@ -0,0 +1,16 @@
// LANGUAGE: +ValueClasses
// TARGET_BACKEND: JVM_IR
// CHECK_BYTECODE_LISTING
// WITH_STDLIB
// FIR_IDENTICAL
@JvmInline
value class DPoint(val x: Double, val y: Double)
fun box(): String {
var point = DPoint(1.0, 2.0)
repeat(10) {
point = DPoint(3.0, 4.0)
}
return if (point == DPoint(3.0, 4.0)) "OK" else point.toString()
}
@@ -0,0 +1,28 @@
@kotlin.jvm.JvmInline
@kotlin.Metadata
public final class DPoint {
// source: 'mutableSharedMfvcVar.kt'
private final field x: double
private final field y: double
private synthetic method <init>(p0: double, p1: double): void
public synthetic final static method box-impl(p0: double, p1: double): DPoint
public final static method constructor-impl(p0: double, p1: double): void
public method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
public static method equals-impl(p0: double, p1: double, p2: java.lang.Object): boolean
public final static method equals-impl0(p0: double, p1: double, p2: double, p3: double): boolean
public final method getX(): double
public final method getY(): double
public method hashCode(): int
public static method hashCode-impl(p0: double, p1: double): int
public @org.jetbrains.annotations.NotNull method toString(): java.lang.String
public static method toString-impl(p0: double, p1: double): java.lang.String
public synthetic final method unbox-impl-x(): double
public synthetic final method unbox-impl-y(): double
}
@kotlin.Metadata
public final class MutableSharedMfvcVarKt {
// source: 'mutableSharedMfvcVar.kt'
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final inner class kotlin/jvm/internal/Ref$DoubleRef
}