flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Dufilie (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-34985) "is" and "as" operators compile incorrectly when using class member variables
Date Fri, 11 Dec 2015 05:32:11 GMT
Andy Dufilie created FLEX-34985:
-----------------------------------

             Summary: "is" and "as" operators compile incorrectly when using class member
variables
                 Key: FLEX-34985
                 URL: https://issues.apache.org/jira/browse/FLEX-34985
             Project: Apache Flex
          Issue Type: Bug
            Reporter: Andy Dufilie


When using "is" or "as" operators, the right operand cross-compiles incorrectly if it references
a class member variable.

Example code:
{code}
private var classDef:Class = String;
public function test1(param:Object):Object
{
	if (param is this.classDef)
		return param as this.classDef;
	return null;
}
{code}

Cross-compiled:
{code}
WeaveTest.prototype.classDef;
WeaveTest.prototype.test1 = function(param) {
  if (org.apache.flex.utils.Language.is(param, classDef))
    return org.apache.flex.utils.Language.as(param, classDef);
  return null;
};
{code}

The right operand becomes {{classDef}} instead of {{this.classDef}}.



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

Mime
View raw message