codalien/operator-overloading-js

Assignment Operators are not working.

Faleij opened this issue · 0 comments

While the test passes they are all wrong for the assignment operators.
For example 'should overload += operator'

// test/tests.js #265
r += 33 + 22;
assertEqual(r, '33+33+22');

Should be

r += 33 + 22;
assertEqual(r, '33+22+=33');

as r += 33 + 22; should be interpretated as r = r.__addAssign(33..__plus(22));

I will be submitting a pull request for solving this after this issue is posted.