-cdf1f58c7578980e1d1949680c7e404961b7c153
+11b7dae7de94215e92eb46e703cfecd76c0a3282
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Type* t = p->type();
if (p->is_anonymous())
{
- if (t->named_type() != NULL && t->points_to() != NULL)
+ if ((t->named_type() != NULL && t->points_to() != NULL)
+ || (t->named_type() == NULL && t->points_to() != NULL
+ && t->points_to()->points_to() != NULL))
{
go_error_at(p->location(), "embedded type may not be a pointer");
p->set_type(Type::make_error_type());
go_assert(expr->type()->struct_type() == st);
}
ret = st->field_reference(expr, name, location);
+ if (ret == NULL)
+ {
+ go_error_at(location, "type has no field %qs",
+ Gogo::message_name(name).c_str());
+ return Expression::make_error(location);
+ }
}
else if (it != NULL && it->find_method(name) != NULL)
ret = Expression::make_interface_field_reference(expr, name,