GNOME Bugzilla – Bug 575257
Basic Genie example does not compile, 0.5.7
Last modified: 2009-04-14 17:44:52 UTC
Steps to reproduce: This source does not compile, Vala 0.5.7: init a:array of string = {"abc", "def", "xyz"} for s in a print(s) Stack trace: There is a missing " in the generated C code. Compilation failed: 2 error(s), 0 warning(s) # valac test.gs test.c: In function '_main': test.c:34: error: stray '\' in program test.c:34:40: warning: missing terminating " character test.c:34: error: missing terminating " character test.c:34: error: 'n' undeclared (first use in this function) test.c:34: error: (Each undeclared identifier is reported only once test.c:34: error: for each function it appears in.) test.c:35: error: expected ')' before '_tmp2' test.c:37: warning: missing sentinel in function call test.c:37: error: expected ')' before '}' token test.c:37: warning: format not a string literal and no format arguments test.c:37: error: expected ';' before '}' token error: cc exited with status 256 Compilation failed: 1 error(s), 0 warning(s) Other information: Note, this example did compile in Vala 0.5.1.
Don't know if it helps, but the same code compile for me if I do for s in a print "%s\n", s
This is now fixed in master