Files
kotlin-fork/compiler/testData/codegen/box/properties/kt4252.kt
T
2023-02-08 06:56:09 +00:00

24 lines
268 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"
}