Files
kotlin-fork/compiler/testData/codegen/box/valueClasses/mutableSharedMfvcVar.kt
T
Evgeniy.Zhelenskiy 19424702e0 [IR] Fix mutable shared reference of MFVC type
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-1179
2023-03-13 13:09:55 +00:00

17 lines
353 B
Kotlin
Vendored

// 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()
}