backend: Fix enum constructor default parameters
The problem was observed in the follwing code: enum class A(one: Int, val two: Int = one) ... The problem is in the `two` default value. Here the enum constructor lowering used an old (not lowered) symbol for `one`. Also the lowering didn't copy the default expression for DEFAULT class. The patch fixes both problems.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
enum class A(one: Int, val two: Int = one) {
|
||||
FOO(42)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println(A.FOO.two)
|
||||
}
|
||||
Reference in New Issue
Block a user