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 2016/01/19 20:47:39 UTC

[jira] [Commented] (FLEX-35013) flexjs funtion int args

    [ https://issues.apache.org/jira/browse/FLEX-35013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15107289#comment-15107289 ] 

Alex Harui commented on FLEX-35013:
-----------------------------------

I'm not sure what you want.  The current output is:

a = function(b) {
}

I think you may be bringing up the topic of how ActionScript converts types automatically.  I'm not sure if the code you suggest is the best way or not.  We might need to do the coercion before the call.  Doing int() calls or typeof checks in the beginning of each method seems wasteful when the incoming value is already of the correct type.  I think we know at function call time if the type is known to match or not and could do the conversion there.  We have a similar issue for regular assignment statements and for conditionals as well, I think.

> flexjs funtion int args
> -----------------------
>
>                 Key: FLEX-35013
>                 URL: https://issues.apache.org/jira/browse/FLEX-35013
>             Project: Apache Flex
>          Issue Type: Bug
>            Reporter: lizhi
>             Fix For: Apache FlexJS 0.6.0
>
>
> as
> function a(b:int):void{
> }
> js short
> function a(b){
>    b=int(b);
> }



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