Commit e495c136 by Ian Lance Taylor

Don't crash on tuple initialization from erroneous channel.

From-SVN: r167882
parent 81ef977e
......@@ -3126,7 +3126,10 @@ Variable::type_from_tuple(Expression* expr, bool report_error) const
else if (expr->receive_expression() != NULL)
{
Expression* channel = expr->receive_expression()->channel();
return channel->type()->channel_type()->element_type();
Type* channel_type = channel->type();
if (channel_type->is_error_type())
return Type::make_error_type();
return channel_type->channel_type()->element_type();
}
else
{
......
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