Files
kotlin-fork/backend.native/tests/codegen/initializers/correctOrder2.kt
T
Igor Chevdar a856e16d2f Local declarations and initializers fixes (#222)
* captured values are stored in corresponding fields before call to super constructor

* preserving the order of initializers

* tests

* refactoring

* - test fix
- workaround of IR bug

* refactoring

* review fix
2017-02-08 14:52:26 +05:00

13 lines
134 B
Kotlin

class Test {
val x: Int
val y = 42
init {
x = y
}
}
fun main(args: Array<String>) {
println(Test().x)
}