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

Shorthand for Vector (new <String>[]) doesn't transpile to []

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Apache FalconJX 0.5.0
    • Apache FalconJX 0.5.0
    • FalconJX
    • None

    Description

      Try the following AS3:

      var array1:Array = new Array();
      var array2:Array = [];
      var vector1:Vector.<String> = new Vector.<String>();
      var vector2:Vector.<String> = new <String>[];

      It results in the following JS:

      var /** @type

      {Array} */ array1 = new Array();
      var /** @type {Array}

      */ array2 = [];
      var /** @type

      {Vector.<string>} */ vector1 = new Array();
      var /** @type {Vector.<string>}

      */ vector2 = new {}();

      vector2 should be initialized with [], similar to how array2 is initialized.

      Attachments

        Activity

          People

            mschmalle Michael Schmalle
            joshtynjala Josh Tynjala
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: