Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/properties/kt10715.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

17 lines
262 B
Kotlin

fun box(): String {
var a = Base()
val count = a.count
if (count != 0) return "fail 1: $count"
val count2 = a.count
if (count2 != 1) return "fail 2: $count2"
return "OK"
}
class Base {
var count: Int = 0
get() = field++
}