Skip to content

Commit

Permalink
compiler: Report errors for malformed builtin calls.
Browse files Browse the repository at this point in the history
    
    Errors reported from malformed builtin calls are handled in a later
    pass than the one in which they are detected.  If a malformed builtin
    call is lowered into an error expression too early, these errors will
    never be reported.
    
    Fixes golang/go#11561.
    
    Reviewed-on: https://go-review.googlesource.com/12778

From-SVN: r226459
  • Loading branch information
Ian Lance Taylor committed Jul 31, 2015
1 parent 1fc642f commit 1393eb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcc/go/gofrontend/MERGE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bc4dda16f8686ab6e7335adfdfd2c6cc81cb2eb5
2bf7c643a1d2f8503070c8e6cb87852026e32400

The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
3 changes: 2 additions & 1 deletion gcc/go/gofrontend/expressions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8499,7 +8499,8 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function,
{
if (!this->fn_->type()->is_error())
this->report_error(_("expected function"));
return Expression::make_error(loc);
this->set_is_error();
return this;
}

// Handle an argument which is a call to a function which returns
Expand Down

0 comments on commit 1393eb7

Please sign in to comment.