ceylon/ceylon-js — comment on commit e3d0d78da2b5c521026aeeb86dd566c5bc5bd17d
File:  line 0
By chochos:

IIRC, the behavior should be like this, assuming for every case that i=1:

b=i++ //b is 1, i is 2
b=++i //b is 2, i is 2
b=i-- //b is 1, i is 0
b=--i //b is 0, i is 0

And of course by the time the visitor is called, the compiler already made sure that "i" is mutable (++ and -- should fail when called on immutable values). Table 6.9 of the Ceylon spec details it in terms of predecessor/successor.