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 587366 - valac shows assertion when generating code
valac shows assertion when generating code
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Arrays
0.7.x
Other All
: Normal major
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-29 21:28 UTC by Kuteynikov
Modified: 2009-10-14 23:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kuteynikov 2009-06-29 21:28:59 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:
Comment 1 Michael 'Mickey' Lauer 2009-10-14 23:36:41 UTC
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.