blob: 2c9d533a3ab3e0f4091e7f054ab9e3c4f169d2c1 [file]
// LANGUAGE: -ForbidParenthesizedLhsInAssignments
class Cell(var x: Int) {
operator fun get(i: Int) = x
operator fun set(i: Int, v: Int) { x = v }
}
fun box(): String {
val c = Cell(0)
(c[0])++
if (c[0] != 1) return "Fail"
return "OK"
}