You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Alex Harui (JIRA)" <ji...@apache.org> on 2015/12/21 22:23:47 UTC
[jira] [Assigned] (FLEX-34987) Parentheses are lost around ternary
operator
[ https://issues.apache.org/jira/browse/FLEX-34987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Harui reassigned FLEX-34987:
---------------------------------
Assignee: Alex Harui
> 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
> Assignee: Alex Harui
>
> 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)