diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-11 18:28:04 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-11 18:28:04 +0000 |
commit | ae506b939eeefcaaa224104ab8556817d6db9621 (patch) | |
tree | c02ae2bded491a669c7551f63fa797a30fcea82e /gcc/go | |
parent | 12e69faaf7eb8ff855b85e2f5f091f5af0b19703 (diff) | |
download | gcc-ae506b939eeefcaaa224104ab8556817d6db9621.tar.gz |
compiler: Error if receiver and parameter have same name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203455 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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) |