Global scope declarations ending with multiple semicolons confuse Vala
Submitted by Eric Gregory
Link to original bug (#664067)
Description
Created attachment 201397 Example Vala code
In the attached example, I've written a simple program where every line ends with multiple semicolons. This is expected to not be a problem, since most languages ignore this.
But valac fails with a strange compiler error:
test.vala:3.10-3.10: error: syntax error, expected `;' void main() { ^ test.vala:1.15-1.14: warning: main blocks are experimental
Now let's modify the program by one character -- remove the second semicolon on the first line, so it looks like this: int TEST = 42;
and compile again. Note that all other lines of this program end with multiple semicolons, but only the global scope variable caused a problem.
Attachment 201397, "Example Vala code":
test.vala