Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium
New issue 692 by [email protected]: Function headers for has_ accessors
within oneof are put as private for enum/string/int32/bool
https://code.google.com/p/protobuf/issues/detail?id=692
What steps will reproduce the problem?
1. define a message with a oneof field with different data types, e.g.
message test {
oneof union_test {
string Str = 1;
bool Boolean = 2;
int32 Bumber = 3;
}
}
2. look for all the has_ accessors inside the generated .pb.h, in this case
has_str(), has_boolean() and has_number().
What is the expected output? What do you see instead?
These methods should be listed as public methods inside the test class but
somehow there is a "private:" being inserted instead:
...
// optional string Str = 1;
private:
inline bool has_str() const;
public:
inline void clear_str();
static const int kStrFieldNumber = 3;
...
What version of the product are you using? On what operating system?
This happens in 3.0.0-alpha-1 and alpha-2 on Ubuntu 12.04.5 LTS
Please provide any additional information below.
- none
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.