Skip to content

Commit

Permalink
Merge branch 'sync-stage' of https://github.com/deannagarcia/protobuf
Browse files Browse the repository at this point in the history
…into sync-stage
  • Loading branch information
deannagarcia committed Jan 28, 2021
2 parents c0f5092 + 868b712 commit 75d125b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/google/protobuf/compiler/java/java_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,6 @@ const std::unordered_set<std::string>* kReservedNames =
"transient", "try", "void", "volatile", "while",
});

// Names that should be avoided as field names in Kotlin.
// All Kotlin hard keywords are in this list.
const std::unordered_set<std::string>* kKotlinForbiddenNames =
new std::unordered_set<std::string>({
"as", "as?", "break", "class", "continue", "do", "else",
"false", "for", "fun", "if", "in", "!in", "interface",
"is", "!is", "null", "object", "package", "return", "super",
"this", "throw", "true", "try", "typealias", "typeof", "val",
"var", "when", "while",
});

bool IsForbidden(const std::string& field_name) {
for (int i = 0; i < GOOGLE_ARRAYSIZE(kForbiddenWordList); ++i) {
if (field_name == kForbiddenWordList[i]) {
Expand Down

0 comments on commit 75d125b

Please sign in to comment.