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 648184 - declaration of multiple global variables results in syntax error
declaration of multiple global variables results in syntax error
Status: RESOLVED DUPLICATE of bug 530030
Product: vala
Classification: Core
Component: Parser
0.12.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-19 08:10 UTC by Andy Tai
Modified: 2011-04-19 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example source code (43 bytes, text/x-vala)
2011-04-19 08:10 UTC, Andy Tai
Details

Description Andy Tai 2011-04-19 08:10:07 UTC
Created attachment 186258 [details]
example source code

If I have in a .vala file, a line

int x, y;

valac complains:

t.vala:1.1-1.3: error: syntax error, expected declaration


but if the declaration is inside a function body it is accepted.

One would be expecting the above line is a valid global variable declaration for two variables.
Comment 1 Adam Dingle 2011-04-19 13:46:46 UTC
I think this is essentially a duplicate of bug 530030.
Comment 2 Jürg Billeter 2011-04-19 13:51:01 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 530030 ***