Bug in compiler when using modules and arrays

Topics: General
Nov 18, 2012 at 2:02 AM

Version 0.8.1:

This example produces invalid JS.

module M
{
    class ClassA {}
}

class Test
{

  private _mListA = new M.ClassA[];

}

 

------------------------JS--------------------------

 var M;
(function (M) {
    var ClassA = (function () {
        function ClassA() { }
        return ClassA;
    })();   
})(M || (M = {}));
var Test = (function () {
    function Test() {
        this._mListA = new ();  // <= here is the problem: missing Array
    }
    return Test;
})();

 

Coordinator
Nov 20, 2012 at 3:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.