Commit ff72e86d by Ian Lance Taylor

Don't crash looking for methods of pointer to error type.

From-SVN: r170431
parent f315816c
...@@ -7799,6 +7799,8 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr, ...@@ -7799,6 +7799,8 @@ Type::bind_field_or_method(Gogo* gogo, const Type* type, Expression* expr,
{ {
expr = Expression::make_unary(OPERATOR_MULT, expr, location); expr = Expression::make_unary(OPERATOR_MULT, expr, location);
type = type->points_to(); type = type->points_to();
if (type->deref()->is_error_type())
return Expression::make_error(location);
nt = type->points_to()->named_type(); nt = type->points_to()->named_type();
st = type->points_to()->struct_type(); st = type->points_to()->struct_type();
it = type->points_to()->interface_type(); it = type->points_to()->interface_type();
......
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