GNOME Bugzilla – Bug 623857
Invalid array declaration syntax is not handled as an error
Last modified: 2017-03-09 20:51:42 UTC
As discussed in mailing list http://mail.gnome.org/archives/vala-list/2010-July/msg00043.html $ cat a.vala #!/usr/bin/vala void main () { // uint8[] foo = new uint8[16]; // OK uint8 foo[] = new uint8[16]; // FAIL print("%d\n", foo[0]); } $ vala a.vala /tmp/a.vala.LDAGFV.c: In function '_vala_main': /tmp/a.vala.LDAGFV.c:16:9: error: array size missing in '_tmp0_' /tmp/a.vala.LDAGFV.c:19:9: error: array size missing in 'foo' /tmp/a.vala.LDAGFV.c:20:16: error: incompatible types when assigning to type 'guint8[1]' from type 'guint8 *' /tmp/a.vala.LDAGFV.c:20:6: error: incompatible types when assigning to type 'guint8[1]' from type 'guint8 *' /tmp/a.vala.LDAGFV.c:22:6: error: incompatible types when assigning to type 'guint8[1]' from type 'void *' error: cc exited with status 256
*** This bug has been marked as a duplicate of bug 641308 ***