The += operator doesn't work with arrays of delegates
I can't add new elements using the +=
operator to an array of delegates.
[CCode (has_target = false)]
delegate string Foo (string s);
void main () {
Foo[] foos = { s => { return s.up (); } };
foos += s => { return s.down (); };
}
test.vala:6.10-6.35: error: Cannot convert lambda expression to `Foo[]?'
foos += s => { return s.down (); };
^^^^^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 1 error(s), 0 warning(s)
Edited by Rico Tzschichholz