From 22508caed3ac82df7826ca23e9dd8ad0e3474cc7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 4 Aug 2011 04:08:29 +0000 Subject: [PATCH] re PR go/49889 (Calling a function whose name is obscured by a local variable does not produce an error) PR go/49889 gccgo : Fixed bug 49889. Now the compiler emits a proper error when a function called in a tuple assignment statement can not be typed as a function. From-SVN: r177310 --- gcc/go/gofrontend/expressions.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index fbd716ab8e9..8053456ef3b 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9682,6 +9682,8 @@ Call_result_expression::do_type() Function_type* fntype = ce->get_function_type(); if (fntype == NULL) { + if (ce->issue_error()) + this->report_error(_("expected function")); this->set_is_error(); return Type::make_error_type(); } -- 2.30.2