Wrong C code generated for arrays in async methods
Submitted by zub..@..vut.cz
Link to original bug (#664412)
Description
Created attachment 201734 Testcase demonstrating the issue.
Some forms of array usage in async methods generates wrong C code.
I'm not sure which of the following is actually legal inside async method:
int[1] a = { -1 }; // compiles ok int b[1] = { -1 }; // cc error int c[] = { -1 }; // cc error
but all are accepted by valac, while the later two then fail at the C compilation stage.
The issue is reproducible on vala git 16fa5197, but also on an ancient vala in debian repo (0.12.1).
Testcase is attached. As I said, I'm not sure what all is actually legal inside an async method, but if the code is not legal, valac should report appropriate error.
Attachment 201734, "Testcase demonstrating the issue.":
async-arrays-test.vala
Version: 0.14.x