#800 += operator doesn't work correctly in JavaScript

Yuri Strot Tue 20 Oct 2009

Hello,

Following example doesn't work correctly in JavaScript:

dur := 1ms
dur += 2ms

The result value is 1ms because JavaScipt compiler generate following code:

var dur = fan.sys.Duration.fromStr("1ms");
dur.plus(fan.sys.Duration.fromStr("2ms"));

but should be:

var dur = fan.sys.Duration.fromStr("1ms");
dur = dur.plus(fan.sys.Duration.fromStr("2ms"));

Best regards,

Yuri Strot

andy Tue 20 Oct 2009

Promoted to ticket #800 and assigned to andy

andy Tue 29 Dec 2009

Ticket resolved in 1.0.49

Login or Signup to reply.