You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Nimai Malle (JIRA)" <ji...@apache.org> on 2016/04/05 16:28:25 UTC
[jira] [Created] (FLEX-35060) Local function doesn't use self to
reference class members
Nimai Malle created FLEX-35060:
----------------------------------
Summary: Local function doesn't use self to reference class members
Key: FLEX-35060
URL: https://issues.apache.org/jira/browse/FLEX-35060
Project: Apache Flex
Issue Type: Bug
Components: FalconJX
Reporter: Nimai Malle
The "self" var is defined but not used within localFunction to reference class var "bar".
///// ACTIONSCRIPT /////
package {
public class foo {
internal var bar:String = "baz";
public function foo() {
function localFunction(i:int) {
if (i==0) {
trace( bar );
}
}
localFunction(0);
}
}
}
///// JAVASCRIPT /////
foo = function() {
var self = this;
function localFunction(i) {
if (i == 0) {
org.apache.flex.utils.Language.trace(bar); // Uncaught ReferenceError: bar is not defined
}
};
localFunction(0);
};
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)