Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium
New issue 676 by klocksve...@gmail.com: protoc does not warn for Java
keyword super
https://code.google.com/p/protobuf/issues/detail?id=676
What steps will reproduce the problem?
1. Be mindless and forget that super is a keyword and try to use it as an
enum identifier.
2. Create protofile:
enum SuperEnum {
super = 1;
}
message SuperMessage {
required SuperEnum super = 1;
}
3. compile with protoc
4. compile with javac
5. Get confused, because a moment ago before some copy and paste
acrobatics, everything worked just fine and the cause is obfuscated by
unrelated errors.
What is the expected output? What do you see instead?
protoc should warn or deny to use identifier super, instead it does not
show any warning.
javac does not compile with error
SuperEnumMessage.java:13: error: identifier expected
implements com.google.protobuf.ProtocolMessageEnum {
and tons of subsequent errors.
What version of the product are you using? On what operating system?
protoc 2.5.0, java hotspot 1.8.0_25, Linux 64-bit
--
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/d/optout.