Files
kotlin-fork/js/js.translator/testData/operatorOverloading/cases/unaryOnIntProperty.kt
T
2014-03-11 20:04:00 +04:00

15 lines
193 B
Kotlin

package foo
class MyInt(i: Int) {
var b = i
fun inc(): MyInt {
b = b++;
return this;
}
}
fun box(): Boolean {
var t = MyInt(0)
t++;
return (t.b == 0)
}