0 Replies Latest reply on Dec 11, 2008 5:18 PM by (Peter_Donovan)

    [svn] 4292: Fixes conditional-expr in a unary expression context

    Level 1
      Revision: 4292
      Author: peted@adobe.com
      Date: 2008-12-11 17:18:45 -0800 (Thu, 11 Dec 2008)

      Log Message:
      -----------
      Fixes conditional-expr in a unary expression context

      Example test case:

      package {
      import flash.display.Sprite;
      import flash.text.TextField;

      public class HelloWorld extends Sprite {

      public function HelloWorld() {
      var txt:TextField = new TextField();
      txt.text = "lose";
      var txt2:TextField = new TextField();
      txt2.text = "win";

      var indices:int = 0;
      var x:int;

      x=~ indices==1?0:1;

      if ( x == 0 )
      {
      addChild(txt);
      }
      else
      {
      addChild(txt2);
      }
      }
      }
      }



      QE Notes: You might want to add a unit test for this sort of thing.
      Doc Notes: None
      Bugs: ASC-3534
      Reviewer: Tom Harwood

      Ticket Links:
      ------------
      http://bugs.adobe.com/jira/browse/ASC-3534

      Modified Paths:
      --------------
      flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ConstantEvaluator.java