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/12/13 07:22:59 UTC

[GitHub] [royale-compiler] aharui commented on issue #104: switch case NaN issue

aharui commented on issue #104: switch case NaN issue
URL: https://github.com/apache/royale-compiler/issues/104#issuecomment-565332185
 
 
   In Flex, compiled with MXMLC, in the standalone debugger:
   ```
   var n:Number;
               trace(isNaN(n));
               switch (n) {
                   case NaN:
                       trace("switch NAN!")
                       break;
                   default:
                       trace("switch not NaN");
               }
   ```
   
   outputs:
   ```
   true
   switch not NaN
   ```
   
   So, NaN != NaN in switch statements in Flash.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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