Files
kotlin-fork/backend.native/tests/codegen/initializers/correctOrder1.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
init {
x = 42
}
val y = x
}
fun main(args: Array<String>) {
println(Test().y)
}