Commit 82afdd42 by Ian Lance Taylor

The type of a string slice is the type of the string being sliced.

From-SVN: r168775
parent 3dac68b9
...@@ -9541,7 +9541,7 @@ String_index_expression::do_type() ...@@ -9541,7 +9541,7 @@ String_index_expression::do_type()
if (this->end_ == NULL) if (this->end_ == NULL)
return Type::lookup_integer_type("uint8"); return Type::lookup_integer_type("uint8");
else else
return Type::make_string_type(); return this->string_->type();
} }
// Determine the type of a string index. // Determine the type of a string index.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment