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-34986) const class member variables get initialized incorrectly
Date Mon, 21 Dec 2015 21:22:46 GMT

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

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

34160e46fec80256786fa4db8f607ccb5003989b

> const class member variables get initialized incorrectly
> --------------------------------------------------------
>
>                 Key: FLEX-34986
>                 URL: https://issues.apache.org/jira/browse/FLEX-34986
>             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
>
>
> {{const}} class members should be initialized the same way that {{var}} members get initialized.
 As it is now, {{const}} member variables are initialized as if they were static.
> Example code:
> {code}
> public class TestClass
> {
> 	public function TestClass(value:String)
> 	{
> 		myConst.prop = value;
> 		myVar.prop = value;
> 	}
> 	public const myConst:Object = {};
> 	public var myVar:Object = {};
> }
> {code}
> Incorrectly cross-compiled:
> {code}
> TestClass = function(value) {
>   
>   this.myVar = {};
>   this.myConst.prop = value;
>   this.myVar.prop = value;
> };
> TestClass.prototype.myConst = {};
> TestClass.prototype.myVar;
> {code}
> Expected correct result:
> {code}
> TestClass = function(value) {
>   this.myConst = {};
>   this.myVar = {};
>   this.myConst.prop = value;
>   this.myVar.prop = value;
> };
> TestClass.prototype.myConst;
> TestClass.prototype.myVar;
> {code}



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

Mime
View raw message