Avoid crash with extra struct initializers with abstract types.

From-SVN: r168984
This commit is contained in:
Ian Lance Taylor 2011-01-19 06:04:00 +00:00
parent 8ed8ea7900
commit 9081b67b9c

View File

@ -10609,6 +10609,10 @@ Struct_construction_expression::do_determine_type(const Type_context*)
(*pv)->determine_type(&subcontext);
}
}
// Extra values are an error we will report elsewhere; we still want
// to determine the type to avoid knockon errors.
for (; pv != this->vals_->end(); ++pv)
(*pv)->determine_type_no_context();
}
// Check types.