Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 572 by ccon...@squareup.com: Enum field names are not sanitized
for reserved word collision
http://code.google.com/p/protobuf/issues/detail?id=572
What steps will reproduce the problem?
Define an enum that uses a c++ reserved word as a field name. e.g.:
enum {
class = 1;
}
What is the expected output? What do you see instead?
The resulting generated code does not compile.
Just like a normal field, these names should be mangled in the generated
code to avoid collision within the target language.
I have attached a proposed patch that fixes the issue for C++. I formatted
the patch with git-am from a git svn mirror with a merge base of trunk at
r512.
Attachments:
0001-Sanitize-Enum-names-from-collisions-with-reserved-wo.patch 6.6 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups "Protocol
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.