Unary operations with nullable/boxed simple-types result in invalid c-code
Using unary operators on nullable/boxed simple-types generates broken c-code.
The given unary operator is applied before the required pointer-indirection to access the actual value.
bool? foo () {
return false;
}
int? bar () {
return 42;
}
void main () {
bool? b = false;
assert (!b);
assert (!foo ());
int? i = 23;
assert (-i == -23);
}
gboolean* b = NULL;
gint* i = NULL;
...
_vala_assert (*(!b), "!b");
...
_vala_assert (_int_equal (-i, &_tmp7_) == TRUE, "-i == -23");
Edited by Rico Tzschichholz