GNOME Bugzilla – Bug 644251
Initialization of fixed size arrays does not work
Last modified: 2011-03-10 16:59:39 UTC
The following short program does not compile: public static int main (string[] args) { int test[3] = { 1, 2, 3 }; return 0; } Output of compiler: test.vala:3.6-3.26: warning: local variable `test' declared but never used int test[3] = { 1, 2, 3 }; ^^^^^^^^^^^^^^^^^^^^^ /home/rikard/progg/retro/test.vala.c: In function ‘_vala_main’: /home/rikard/progg/retro/test.vala.c:23: error: incompatible types when assigning to type ‘gint[3]’ from type ‘gint *’ error: cc exited with status 256 Compilation failed: 1 error(s), 1 warning(s)
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 644046 ***