Support to define multiple variables in one line in a class or struct
Vala now support to define multiple variables in one line in a block or the top space:
int a, b, c;
However, this is not supported in a class or struct:
#!/usr/bin/env -S vala -X -O2 -X -march=native --cc="ccache cc" -X -pipe -X -fuse-ld=mold
struct Color {
uint8 r, g, b;
}
void main () {
}
/home/wszqkzqk/projects/vala-tests/test-struct.vala:4.5-4.9: error: syntax error, expected declaration
This may be a bug.
Edited by Zhou Qiankang