GNOME Bugzilla – Bug 616930
Array concatenation not supported for public variables
Last modified: 2018-05-22 13:34:37 UTC
The problem arises when using the += operator with arrays. Works: struct Foo { Foo[] foos; } void main(string[] args) { Foo f = Foo(); f.foos = new Foo[0]; f.foos += Foo(); } Does NOT work: public struct Foo { Foo[] foos; } void main(string[] args) { Foo f = Foo(); f.foos = new Foo[0]; f.foos += Foo(); }
this is also the case with public classes.
This is a problem also with classes and public fields. Currently += is not yet supported for public array fields.
commit 89c0afc73b3d0d9aa34403f831361610c1bddf45 Author: Jürg Billeter <j@bitron.ch> Date: Thu Sep 9 17:58:10 2010 +0200 codegen: Report error on unsupported use of array concatenation
*** Bug 609728 has been marked as a duplicate of this bug. ***
-- 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/93.