Improve object init order. (#187)
This commit is contained in:
@@ -834,6 +834,11 @@ task initializers4(type: RunKonanTest) {
|
||||
source = "runtime/basic/initializers4.kt"
|
||||
}
|
||||
|
||||
task initializers5(type: RunKonanTest) {
|
||||
goldValue = "42\n"
|
||||
source = "runtime/basic/initializers5.kt"
|
||||
}
|
||||
|
||||
task expression_as_statement(type: RunKonanTest) {
|
||||
goldValue = "Ok\n"
|
||||
source = "codegen/basics/expression_as_statement.kt"
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
object A {
|
||||
val a = 42
|
||||
val b = A.a
|
||||
}
|
||||
|
||||
fun main(args : Array<String>) {
|
||||
println(A.b)
|
||||
}
|
||||
Reference in New Issue
Block a user