Files
kotlin-fork/compiler/testData/codegen/box/properties/kt4252.kt
T
2015-04-07 13:08:51 +03:00

23 lines
267 B
Kotlin
Vendored

class CallbackBlock {}
public class Foo
{
companion object {
private var bar = 0
}
init {
++bar
}
fun getBar(): Int = bar
}
fun box() : String {
val foo = Foo()
if (foo.getBar() != 1) return "Fail";
return "OK"
}