Const struct array fields cannot be initialized
Submitted by pancake
Link to original bug (#741491)
Description
Maybe i'm doing something wrong, but i can't find any way to do this in Vala.
This is the test:
struct Foo {
public string name;
public string title;
public int[] ages;
}
const Foo foo = {
name: "Hello",
title: "World",
ages: { 1,2,3 }
};
void main() {
print ("%s\n", foo.ages[1]);
}