FIR2IR: convert enums with non-primary default ctor correctly
see added test for example
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
|
||||
enum class Test {
|
||||
A(0),
|
||||
B;
|
||||
|
||||
val n: Int
|
||||
|
||||
constructor(n: Int) { this.n = n }
|
||||
constructor() : this(0)
|
||||
}
|
||||
|
||||
fun box(): String =
|
||||
if (Test.A.n == Test.B.n)
|
||||
"OK"
|
||||
else
|
||||
"Fail"
|
||||
Reference in New Issue
Block a user