polytronicgr / sharpkit

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

array initialisation #367

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
C# arrays are initialised, JS arrays are not. For example, a C# method that 
creates a bool array will obtain an array full of "false", but it will 
translate to a JS function that creates an array full of "undefined". 
Attempting to test the content of the array could then produce different 
results.

It would be nice to have an option to tell SharpKit that whenever it translates 
the construction of an array, it should add a loop to fill it with the base 
type's default value.

Original issue reported on code.google.com by filp...@tin.it on 18 Sep 2014 at 2:52