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

18 lines
214 B
Kotlin

package foo
class MyInt() {
var b = 0
fun inc() : MyInt {
val res = MyInt()
res.b++;
return res;
}
}
fun box() : Boolean {
var c = MyInt()
c++;
return (c.b == 1);
}