kjm00king / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

NoClr generates broken javascript going from version 5.01.1000 to 5.01.5000 #297

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Run the testcode together in a project with the file noclr.js
https://code.google.com/p/sharpkit/source/browse/trunk/SharpKit.JavaScript.NoClr
/noclr.cs

Test code:
    [JsType(JsMode.Prototype)]
    class Test
    {
        public static void Test2()
        {
            Dictionary<int,string> dict = new Dictionary<int, string>();
            var i = dict[4];
            var dc = dict.Count;
            List<int> list = new  List<int>();
            var lc = list.Count;

            JsObject obj = new JsObject();
            var x = obj["test"];
            var jl = new JsArray();
            jl[4] = 3;
        }
    }

With 5.01.1000 i get:
Test.Test.Test2 = function ()
{
    var dict = [];
    var i = dict[4];
    var dc = dict.Count;
    var list = new Array();
    var lc = list.length;
    var obj = new Object();
    var x = obj["test"];
    var jl =  [];
    jl[4] = 3;
};

With 5.01.5000
Test.Test.Test2 = function ()
{
    var dict = [];
    var i = dict(4); //<---Invalid
    var dc = dict.Count;
    var list = new Array();
    var lc = list.get_length(); //<---Invalid
    var obj = new Object();
    var x = obj["test"];
    var jl =  [];
    jl[4] = 3;
};

Original issue reported on code.google.com by Hultqvis...@gmail.com on 25 Jun 2013 at 4:00

GoogleCodeExporter commented 8 years ago

Original comment by DanelK...@gmail.com on 26 Jun 2013 at 2:39