Return-Path: X-Original-To: apmail-flex-issues-archive@minotaur.apache.org Delivered-To: apmail-flex-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63B721805A for ; Fri, 11 Dec 2015 05:54:11 +0000 (UTC) Received: (qmail 92213 invoked by uid 500); 11 Dec 2015 05:54:11 -0000 Delivered-To: apmail-flex-issues-archive@flex.apache.org Received: (qmail 92186 invoked by uid 500); 11 Dec 2015 05:54:11 -0000 Mailing-List: contact issues-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list issues@flex.apache.org Received: (qmail 92177 invoked by uid 99); 11 Dec 2015 05:54:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Dec 2015 05:54:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E29F82C14DC for ; Fri, 11 Dec 2015 05:54:10 +0000 (UTC) Date: Fri, 11 Dec 2015 05:54:10 +0000 (UTC) From: "Andy Dufilie (JIRA)" To: issues@flex.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (FLEX-34986) const class member variables get initialized incorrectly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andy Dufilie created FLEX-34986: ----------------------------------- Summary: 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 {{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)