What steps will reproduce the problem?
1. save the attached proto file as addressbook.proto
2. protoc --go_out=. addressbook.proto
3. 6g addressbook.pb.go
What is the expected output?
Compile with no errors.
What do you see instead?
addressbook.pb.go:32: AddressBook_Person_PhoneType redeclared in this block
previous declaration at addressbook.pb.go:11
addressbook.pb.go:34: AddressBook_Person_MOBILE redeclared in this block
previous declaration at addressbook.pb.go:13
addressbook.pb.go:35: AddressBook_Person_HOME redeclared in this block
previous declaration at addressbook.pb.go:14
addressbook.pb.go:36: AddressBook_Person_WORK redeclared in this block
previous declaration at addressbook.pb.go:15
addressbook.pb.go:42: AddressBook_Person_PhoneType_name redeclared in this block
previous declaration at addressbook.pb.go:21
addressbook.pb.go:47: AddressBook_Person_PhoneType_value redeclared in this
block
previous declaration at addressbook.pb.go:26
addressbook.pb.go:48: NewAddressBook_Person_PhoneType redeclared in this block
previous declaration at addressbook.pb.go:27
What version of the product are you using? On what operating system?
$ pwd; hg identify
/Users/eclark/go/src/pkg/goprotobuf.googlecode.com/hg
3cf1c4f2acec tip
$ protoc --version
libprotoc 2.3.0
Please provide any additional information below.
Generated code works if message Person {} is defined outside of AddressBook.
Original issue reported on code.google.com by zer...@gmail.com on 26 Jun 2010 at 2:29
Original issue reported on code.google.com by
zer...@gmail.com
on 26 Jun 2010 at 2:29Attachments: