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

Justin Mclean commented on FLEX-34951:
--------------------------------------

I think this is actually OK. Flash will perform an implicit conversion when 
returning from a function and undefined in this case is converted to 0. i.e. 
It's an implicit conversion to a related type rather than to an unrelated type.

See 
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f87.html

> Returning undefined on a non-void function does not cause an error on 
> compiling
> -------------------------------------------------------------------------------
>
>                 Key: FLEX-34951
>                 URL: https://issues.apache.org/jira/browse/FLEX-34951
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.14.1
>         Environment: Linux 4.2.3 x86_64
>            Reporter: Sword Dragon
>         Attachments: testcase.mxml
>
>
> For example if a function expects to get int returned but a String is being 
> returned the compiler exits with an error but if undefined is being returned 
> the compiler accepts this.



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

Reply via email to