aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-10-11 18:28:04 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-10-11 18:28:04 +0000
commit08580c3477636e824e5d8e4ef87927a4b78193c4 (patch)
treec02ae2bded491a669c7551f63fa797a30fcea82e /gcc
parentd621811443516a0133fb6999c3b3e610773c1743 (diff)
downloadgcc-08580c3477636e824e5d8e4ef87927a4b78193c4.zip
gcc-08580c3477636e824e5d8e4ef87927a4b78193c4.tar.gz
gcc-08580c3477636e824e5d8e4ef87927a4b78193c4.tar.bz2
compiler: Error if receiver and parameter have same name.
From-SVN: r203455
Diffstat (limited to 'gcc')
-rw-r--r--gcc/go/gofrontend/parse.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc
index 498125b..9c7d827 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)