OSDN Git Service

The type of a string slice is the type of the string being sliced.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jan 2011 05:37:12 +0000 (05:37 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Jan 2011 05:37:12 +0000 (05:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168775 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/expressions.cc

index 550d1ae..a11e3d6 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.