Get-Property for GLib.List causing vala_ccode_base_module_generate_property_accessor_declaration: assertion 'acc != NULL' failed
With the following code snippet:
class Foo {
public List<string> bar { get; }
}
void main () {
var foo = new Foo ();
foo.bar.append ("foo");
}
valac outputs the following:
$ valac test.vala
(valac:19656): vala-ccodegen-CRITICAL **: 20:57:33.152: vala_ccode_base_module_generate_property_accessor_declaration: assertion 'acc != NULL' failed
(valac:19656): vala-ccodegen-CRITICAL **: 20:57:33.153: vala_get_ccode_name: assertion 'node != NULL' failed
(valac:19656): vala-ccode-CRITICAL **: 20:57:33.153: vala_ccode_identifier_construct: assertion '_name != NULL' failed
(valac:19656): vala-ccode-CRITICAL **: 20:57:33.153: vala_ccode_expression_write_inner: assertion 'self != NULL' failed
/home/rasmus/Downloads/test.vala.c: In function '_vala_main':
/home/rasmus/Downloads/test.vala.c:327:7: warning: ignoring return value of 'g_list_append', declared with attribute warn_unused_result [-Wunused-result]
327 | (foo, g_list_append (_tmp2_, _tmp3_));
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tested with valac 0.48.7
Edited by Rasmus Thomsen