From: Ian Lance Taylor Date: Sat, 19 Feb 2011 03:37:30 +0000 (+0000) Subject: Avoid dangling open function after erroneous method expression. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=196bc4071beb8caa9897f3ffaabb7ebb472e9b3c;p=gcc.git Avoid dangling open function after erroneous method expression. From-SVN: r170302 --- diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index e1d59bef798..c17cc9efc00 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -10335,7 +10335,10 @@ Selector_expression::lower_method_expression(Gogo* gogo) // Even though we found the method above, if it has an error type we // may see an error here. if (bm->is_error_expression()) - return bm; + { + gogo->finish_function(location); + return bm; + } Expression_list* args; if (method_parameters == NULL)