[IR] Add more tests for inline/value classes secondary constructors

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

#KT-55333
This commit is contained in:
Evgeniy.Zhelenskiy
2023-04-12 00:59:14 +02:00
committed by Space Team
parent f75b72990e
commit 8c748bfea4
52 changed files with 909 additions and 31 deletions
@@ -0,0 +1,11 @@
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
@JvmInline
value class A<!CONFLICTING_JVM_DECLARATIONS!>(val x: Int)<!> {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: UInt)<!>: this(x.toInt())
}
data class B<!CONFLICTING_JVM_DECLARATIONS!>(val x: UInt)<!> {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: Int)<!> : this(x.toUInt())
}
@@ -0,0 +1,11 @@
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
@JvmInline
value class <!CONFLICTING_JVM_DECLARATIONS!>A(val x: Int)<!> {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: UInt)<!>: this(x.toInt())
}
data class <!CONFLICTING_JVM_DECLARATIONS!>B(val x: UInt)<!> {
<!CONFLICTING_JVM_DECLARATIONS!>constructor(x: Int)<!> : this(x.toUInt())
}