From 196bc4071beb8caa9897f3ffaabb7ebb472e9b3c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 19 Feb 2011 03:37:30 +0000 Subject: [PATCH] Avoid dangling open function after erroneous method expression. From-SVN: r170302 --- 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 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) -- 2.30.2