Invalid initializer type is ignored
void main () {
string foo = string;
}
$ valac test.vala
(valac:777246): vala-CRITICAL **: 18:48:37.413: vala_data_type_compatible: assertion 'self != NULL' failed
(valac:777246): vala-CRITICAL **: 18:48:37.413: vala_code_node_to_string: assertion 'self != NULL' failed
test.vala:2.9-2.11: error: Assignment: Cannot convert from `(null)' to `string?'
2 | string foo = string;
| ^~~
Compilation failed: 1 error(s), 0 warning(s)
string bar;
void main () {
bar = string;
}
$ valac test.vala
(valac:777296): vala-ccodegen-CRITICAL **: 18:49:40.556: vala_ccode_assignment_module_real_store_field: assertion 'value != NULL' failed
Edited by Rico Tzschichholz