Andy Dufilie created FLEX-34987:
-----------------------------------

             Summary: Parentheses are lost around ternary operator
                 Key: FLEX-34987
                 URL: https://issues.apache.org/jira/browse/FLEX-34987
             Project: Apache Flex
          Issue Type: Bug
          Components: Falcon, FlexJS
    Affects Versions: Apache FlexJS 0.5.0
            Reporter: Andy Dufilie


Example code:
{code}
public static function getTestString(a:Number, b:Number):String
{
        return "a " + (a < b ? "<" : ">=") + " b";
}
{code}

Incorrectly cross-compiled:
{code}
TestClass.getTestString = function(a, b) {
  return "a " + a < b ? "<" : ">=" + " b";
};
{code}

Because the parentheses are lost, the function will always return ">= b".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to