projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea6c2b0
)
re PR go/49889 (Calling a function whose name is obscured by a local variable does...
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 4 Aug 2011 04:08:29 +0000
(
04:08
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 4 Aug 2011 04:08:29 +0000
(
04:08
+0000)
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
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/expressions.cc
b/gcc/go/gofrontend/expressions.cc
index fbd716ab8e91fef1be60bde503de85e5ef5c716e..8053456ef3b01a18dd8d4c618d033ed6b86168ec 100644
(file)
--- 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();
}