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 541152 - Parser doesn't allow local const arrays
Parser doesn't allow local const arrays
Status: RESOLVED DUPLICATE of bug 530623
Product: vala
Classification: Core
Component: Parser
0.3.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-01 23:03 UTC by Michael Terry
Modified: 2008-07-02 06:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Terry 2008-07-01 23:03:19 UTC
The following code:

const string[] global = {"foo"};

void func() {
	const string[] local = {"bar"};
}

results in:
error: syntax error, expected `;'
	const string[] local = {"bar"};
	            ^

That is, valac allows the global, but not the local const array.  I figure it should allow both.
Comment 1 Jaap A. Haitsma 2008-07-02 06:10:25 UTC
*** This bug has been marked as a duplicate of 530623 ***