Files
kotlin-fork/js/js.translator/testData/operatorOverloading/cases/postfixInc.kt
T
2014-03-11 20:04:00 +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);
}