-79eca4fd642724d89e9bec8f79889451f6632a46
+8e74a218e11ef6eaaf7014a3ad1cd0b13359c607
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
arg_type = arg_type->points_to();
if (arg_type->array_type() != NULL
- && arg_type->array_type()->length() != NULL
- && Builtin_call_expression::array_len_is_constant(arg))
- return true;
+ && arg_type->array_type()->length() != NULL)
+ {
+ this->seen_ = true;
+ bool ret = Builtin_call_expression::array_len_is_constant(arg);
+ this->seen_ = false;
+ return ret;
+ }
if (this->code_ == BUILTIN_LEN && arg_type->is_string_type())
{
// We mostly only have to remember named types. But it turns out
// that an interface type can refer to itself without using a name
// by relying on interface inheritance, as in
- // type I interface { F() interface{I} }
+ //
+ // type I interface { F() interface{I} }
+ //
+ // Similarly it is possible for array types to refer to themselves
+ // without a name, e.g.
+ //
+ // var x [uintptr(unsafe.Sizeof(&x))]byte
+ //
if (type->classification() != Type::TYPE_NAMED
+ && type->classification() != Type::TYPE_ARRAY
&& type->classification() != Type::TYPE_INTERFACE)
return false;
if (this->types_seen_ == NULL)