Files
kotlin-fork/js/js.translator/testData/operatorOverloading/cases/postfixInc.kt
T

18 lines
223 B
Kotlin
Vendored

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