See: https://github.com/UCSD-PL/RefScript/blob/master/tests/todo/compound-assignment-operator.ts Easy workaround: move ++ outside of complex expressions.