[IR] Fix inline class constructors having MFVC parameters
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com> #KT-1179
This commit is contained in:
committed by
Space Team
parent
2535a87f85
commit
07576b03c4
+22
@@ -0,0 +1,22 @@
|
||||
// LANGUAGE: +ValueClasses
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// CHECK_BYTECODE_TEXT
|
||||
// FIR_IDENTICAL
|
||||
|
||||
@JvmInline
|
||||
value class IC(val x: Int) {
|
||||
constructor(mfvc: MFVC) : this(mfvc.x + mfvc.y)
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class MFVC(val x: Int, val y: Int) {
|
||||
constructor(ic: IC) : this(ic.x, ic.x)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
require(IC(MFVC(1, 2)) == IC(3))
|
||||
require(MFVC(IC(1)) == MFVC(1, 1))
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user