summaryrefslogtreecommitdiffstats
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/gogo.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index be4de9ce097..634eccdcc06 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -3165,7 +3165,7 @@ Variable::type_from_tuple(Expression* expr, bool report_error) const
{
Expression* channel = expr->receive_expression()->channel();
Type* channel_type = channel->type();
- if (channel_type->is_error_type())
+ if (channel_type->channel_type() == NULL)
return Type::make_error_type();
return channel_type->channel_type()->element_type();
}
OpenPOWER on IntegriCloud