FIR2IR: convert enums with non-primary default ctor correctly

see added test for example
This commit is contained in:
Ilya Chernikov
2022-08-17 15:37:16 +02:00
parent 22d6906b33
commit 4e4511bba2
13 changed files with 85 additions and 14 deletions
@@ -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"