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 616930 - Array concatenation not supported for public variables
Array concatenation not supported for public variables
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
rejects-valid test-case
: 609728 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-04-27 10:10 UTC by Fabian Deutsch
Modified: 2018-05-22 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabian Deutsch 2010-04-27 10:10:16 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();
}
Comment 1 Fabian Deutsch 2010-04-27 10:33:52 UTC
this is also the case with public classes.
Comment 2 Luca Bruno 2010-04-27 20:04:52 UTC
This is a problem also with classes and public fields. Currently += is not yet supported for public array fields.
Comment 3 Jürg Billeter 2010-10-06 18:17:04 UTC
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
Comment 4 Jürg Billeter 2010-10-19 15:05:09 UTC
*** Bug 609728 has been marked as a duplicate of this bug. ***
Comment 5 GNOME Infrastructure Team 2018-05-22 13:34:37 UTC
-- 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.