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 575257 - Basic Genie example does not compile, 0.5.7
Basic Genie example does not compile, 0.5.7
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.5.x
Other All
: Normal critical
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-13 14:49 UTC by Barry Kauler
Modified: 2009-04-14 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Barry Kauler 2009-03-13 14:49:27 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.
Comment 1 chimpninja 2009-03-13 23:05:47 UTC
Don't know if it helps, but the same code compile for me if I do

for s in a
    print "%s\n", s
Comment 2 Jamie McCracken 2009-04-14 17:44:52 UTC
This is now fixed in master