Don't let array indexes be untyped.

From-SVN: r170193
This commit is contained in:
Ian Lance Taylor 2011-02-15 19:06:34 +00:00
parent 8d620a1a26
commit 1c4a5fc8ca
1 changed files with 2 additions and 3 deletions

View File

@ -9225,10 +9225,9 @@ void
Array_index_expression::do_determine_type(const Type_context*)
{
this->array_->determine_type_no_context();
Type_context subcontext(NULL, true);
this->start_->determine_type(&subcontext);
this->start_->determine_type_no_context();
if (this->end_ != NULL)
this->end_->determine_type(&subcontext);
this->end_->determine_type_no_context();
}
// Check types of an array index.