compiler: allow capitalized java keywords as rpc names#4309
Merged
zpencer merged 4 commits intogrpc:masterfrom Apr 5, 2018
Merged
compiler: allow capitalized java keywords as rpc names#4309zpencer merged 4 commits intogrpc:masterfrom
zpencer merged 4 commits intogrpc:masterfrom
Conversation
previously `Import` fails because it gets turned into a method named `import`. This PR makes the method be named `import_`, everything else stays the same, such as the name in the method descriptor. Note: `iMport` or `iMPORT` or any variation of capitalizations that is not `Import` always worked. `Import` gets translated into `import` because of our attempts to camel case the names.
ejona86
approved these changes
Apr 5, 2018
| } | ||
| } | ||
| return w; | ||
| if (java_keywords.find(w) == java_keywords.end()) { |
Member
There was a problem hiding this comment.
Could you invert this condition so the final return is the common/successful case?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
previously
Importfails because it gets turned into a method namedimport. This PR makes the method be namedimport_, everything elsestays the same, such as the name in the method descriptor.
Note:
iMportoriMPORTor any variation of capitalizations that isnot
Importalways worked.Importgets translated intoimportbecause of our attempts to camel case the names.
fixes #2195