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

18 lines
206 B
Kotlin

package foo
var a = MyInt()
class MyInt() {
var b = 0
fun inc() : MyInt {
b = b + 1;
return this;
}
}
fun box() : Boolean {
val d = a++;
return (a.b == 1) && (d.b == 1);
}