You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2019/02/09 21:40:59 UTC

[GitHub] Harbs commented on issue #74: Assign to int or uint variable does not convert Number from floating point to integer

Harbs commented on issue #74: Assign to int or uint variable does not convert Number from floating point to integer
URL: https://github.com/apache/royale-compiler/issues/74#issuecomment-462081784
 
 
   It looks like the int coercions is a little too eager and any arithmetic causes coercions:
   In a method with the following signature:
   `function getAtomBounds(atomIndex:int):Rectangle`
   `var nextIdx:int = atomIndex+1;`
   compiles to:
   `  var /** @type {number} */ nextIdx = (atomIndex + 1) >> 0;`
   When it should only be:
   `  var /** @type {number} */ nextIdx = atomIndex + 1;`
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services