From deed2020853b84c7bc74611ae7299cca5f2b63c8 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Mar 2011 01:17:34 +0000 Subject: [PATCH] Fix type of discarded send expression. From-SVN: r170634 --- gcc/go/gofrontend/expressions.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index ee486ffb27a..a45e7acc247 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -12321,7 +12321,10 @@ Send_expression::do_traverse(Traverse* traverse) Type* Send_expression::do_type() { - return Type::lookup_bool_type(); + if (this->is_value_discarded_) + return Type::make_void_type(); + else + return Type::lookup_bool_type(); } // Set types. -- 2.30.2