Files
kotlin/compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt
2018-06-28 12:26:41 +02:00

20 lines
307 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// IGNORE_BACKEND: JS_IR
object O {
val mmmap = HashMap<String, Int>();
init {
fun doStuff() {
mmmap.put("two", 2)
}
doStuff()
}
}
fun box(): String {
val r = O.mmmap["two"]
if (r != 2) return "Fail: $r"
return "OK"
}