GNOME Bugzilla – Bug 587366
valac shows assertion when generating code
Last modified: 2009-10-14 23:36:41 UTC
Please describe the problem: ** (valac:30135): CRITICAL **: vala_ccode_array_module_append_initializer_list: assertion `initializer_list != NULL' failed Steps to reproduce: 1. using GLib; class Obj : Object { public int a; public int b; public int c; } class Table : Object { public Obj[1000] objects; public Table() { objects = new Obj[1000]; } } int main(string[] args) { return 0; } 2. valac -o bug bug.vala Actual results: assertion Expected results: Does this happen every time? yes Other information:
Vala no longer allows specifying an array length at object declaration time. Your code now fails with: obj.vala:12.10-12.18: error: syntax error, no expression allowed between array brackets public Obj[1000] objects; ^^^^^^^^^ Removing the 1000 compiles without problems.