Fixes bug 637521.
if (initlist != null) {
initlist.target_type = new ArrayType (element_type, rank, source_reference);
- initlist.check (context);
+ if (!initlist.check (context)) {
+ error = true;
+ }
var ret = create_sizes_from_initializer_list (context, initlist, rank, calc_sizes);
if (ret == -1) {
right.value_type = variable.variable_type;
} else {
error = true;
- Report.error (source_reference, "Assignment: Invalid callback assignment attempt");
+ Report.error (source_reference, "Assignment: Invalid assignment attempt");
return false;
}
}
foreach (Expression e in get_initializers ()) {
if (e.value_type == null) {
error = true;
+ Report.error (e.source_reference, "expression type not allowed as initializer");
continue;
}