Files
kotlin-fork/js/js.translator/testData/box/expression/misc/exclExclResultIsComputedOnce.kt
T
2016-09-29 12:00:40 +03:00

12 lines
179 B
Kotlin
Vendored

package foo
var c = 0
val a: Int?
get() {
c++
return 2
}
fun box(): String {
return if (c == 0 && (a!! + 3) == 5 && c == 1) return "OK" else "fail"
}