GNOME Bugzilla – Bug 548429
Various problems with string[][]: assignments
Last modified: 2010-10-16 13:38:24 UTC
$ valac test.vala test.vala:4.21-4.23: error: internal error: duplicating string[][] instances not yet supported string [][] def = abc; ^^^ Compilation failed: 1 error(s), 0 warning(s) $ cat test.vala public class test { public static void main () { string [][] abc = new string [1][2]; string [][] def = abc; } } $
multidimensional arrays are declared differently than in C.. maybe the parser should warn about this usage.. this works fine: public class test { public static void main () { string [,] abc = new string [1,2]; string [,] def = abc; } }
Meanwhile, the situation got worse with regards to the original issue. Vala no longer emits an error, but CRITICALs: ** (valac:13608): CRITICAL **: vala_ccode_array_module_real_get_array_length_cexpression: assertion `array_expr != NULL' failed ** (valac:13608): CRITICAL **: vala_ccode_function_call_add_argument: assertion `expr != NULL' failed Compilation succeeded - 1 warning(s)
commit cc435dd6ec069b87e986fa454e80e5fe80a0df72 Author: Jürg Billeter <j@bitron.ch> Date: Sat Oct 16 15:17:23 2010 +0200 Report error when trying to use stacked arrays Stacked array support was never completed. Report an error instead of generating incorrect C code. Fixes bug 546603, bug 548428, bug 548429, bug 565865, bug 565872, bug 571322, bug 572649, and bug 576611.