Files
kotlin-fork/js/js.translator/testFiles/operatorOverloading/cases/unaryOnIntProperty2.kt
T
2012-02-27 21:55:58 +04:00

15 lines
180 B
Kotlin

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