Files
kotlin-fork/compiler/testData/codegen/box/classes/kt1120.kt
T
Mikhail Glukhikh fe13f39de9 Use of uninitialized variables in lambdas / object literals / local functions is forbidden now #KT-4475 Fixed
Local declarations CFA: variable initialization information before them is now taken into account
2015-11-17 18:21:09 +03:00

16 lines
332 B
Kotlin
Vendored

object RefreshQueue {
val any = Any()
val workerThread: Thread = Thread(object : Runnable {
override fun run() {
val a = any
val b = RefreshQueue.any
if (a != b) throw AssertionError()
}
})
}
fun box() : String {
RefreshQueue.workerThread.run()
return "OK"
}