From 08580c3477636e824e5d8e4ef87927a4b78193c4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 11 Oct 2013 18:28:04 +0000 Subject: [PATCH] compiler: Error if receiver and parameter have same name. From-SVN: r203455 --- gcc/go/gofrontend/parse.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index 498125bb241..9c7d8277efa 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -744,6 +744,8 @@ Parse::signature(Typed_identifier* receiver, Location location) return NULL; Parse::Names names; + if (receiver != NULL) + names[receiver->name()] = receiver; if (params != NULL) this->check_signature_names(params, &names); if (results != NULL) -- 2.30.2