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

call to Language.closure() generated incorrectly when function is static

    XMLWordPrintableJSON

Details

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

    Description

      AS input:

      package foo.bar {
      	public class TestClass {
      		public static function test_nonstatic():void {
      			var fn:Function = TestClass.staticFunction;
      		}
      		
      		public static function staticFunction(a:Number, b:Number):Number {
      			return a + b;
      		}
      	}
      }
      

      JS output (relevant part only):

        var /** @type {Function} */ fn = org.apache.flex.utils.Language.closure(foo.bar.TestClass.staticFunction, TestClass, 'TestClass');
      

      In the JS code above, it should use foo.bar.TestClass instead of TestClass. The code will crash because the package is missing.

      Attachments

        Activity

          People

            aharui Alex Harui
            adufilie Andy Dufilie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: