Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-35005

internal class members do not get prefixed with "this." when cross-compiling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Apache FlexJS 0.5.0
    • Apache FalconJX 0.6.0
    • Falcon, FlexJS
    • None

    Description

      AS input:

      package foo.bar {
      	public class TestInternalProperty {
      		public var myPublicVar:Number = 1;
      		private var myPrivateVar:Number = 2;
      		internal var myInternalVar:Number = 3;
      		
      		public function test():Number {
      			return myPublicVar + myPrivateVar + myInternalVar;
      		}
      	}
      }
      

      JS output (relevant part only):

      foo.bar.TestInternalProperty.prototype.myPublicVar = 1;
      foo.bar.TestInternalProperty.prototype.myPrivateVar = 2;
      foo.bar.TestInternalProperty.prototype.myInternalVar = 3;
      
      foo.bar.TestInternalProperty.prototype.test = function() {
        return this.myPublicVar + this.myPrivateVar + myInternalVar;
      };
      

      In the test() function, notice that myInternalVar does not become this.myInternalVar like the public and private variables.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adufilie Andy Dufilie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: