After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 644251 - Initialization of fixed size arrays does not work
Initialization of fixed size arrays does not work
Status: RESOLVED DUPLICATE of bug 644046
Product: vala
Classification: Core
Component: Arrays
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-03-08 22:22 UTC by Rikard Nordgren
Modified: 2011-03-10 16:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Rikard Nordgren 2011-03-08 22:22:35 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)
Comment 1 Luca Bruno 2011-03-10 16:59:39 UTC
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 ***