]> gcc.gnu.org Git - gcc.git/commitdiff
The type of a string slice is the type of the string being sliced.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Jan 2011 05:37:12 +0000 (05:37 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 14 Jan 2011 05:37:12 +0000 (05:37 +0000)
From-SVN: r168775

gcc/go/gofrontend/expressions.cc

index 550d1aea0ab9c6078f6d81e8f52937e8d633cdef..a11e3d6fa176ffd3ed31398f4eab155ad6a66c2c 100644 (file)
@@ -9541,7 +9541,7 @@ String_index_expression::do_type()
   if (this->end_ == NULL)
     return Type::lookup_integer_type("uint8");
   else
-    return Type::make_string_type();
+    return this->string_->type();
 }
 
 // Determine the type of a string index.
This page took 0.078323 seconds and 5 git commands to generate.