flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-34987) Parentheses are lost around ternary operator
Date Tue, 22 Dec 2015 06:16:46 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Harui resolved FLEX-34987.
-------------------------------
       Resolution: Fixed
    Fix Version/s: Apache FalconJX 0.6.0

3ee42de4bc8ffefcc8df5a09bf2739ed33db6194

> 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
>             Fix For: Apache FalconJX 0.6.0
>
>
> 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)

Mime
View raw message