GNOME Bugzilla – Bug 782101
Attempt to initialize variable-sized arrays
Last modified: 2018-05-22 15:49:19 UTC
The following snippet: const int width = 50; const int height = 50; uint8 drawbuf[width*height*3]; Vala attempts to transform into the following code: guint8 drawbuf[(width * height) * 3] = {0}; Throwing the following error: "variable-sized object may not be initialized", perhaps due to the {0} added there. Vala 0.34.7
You may not define your constants inside a method-block.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/586.