Skip to content

Commit 03e6f43

Browse files
egormodingonzojive
authored andcommitted
Add 'static' keyword for enums defined inside the class
1 parent dfa5a70 commit 03e6f43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

generator/js_generator.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3622,7 +3622,7 @@ void Generator::GenerateEnum(const GeneratorOptions& options,
36223622
const EnumDescriptor* enumdesc) const {
36233623

36243624
const bool is_toplevel = enumdesc->containing_type() == nullptr;
3625-
const std::string enumNamePrefix = is_toplevel ? "export const " : "";
3625+
const std::string enumNamePrefix = is_toplevel ? "export const " : "static ";
36263626

36273627
// TODO(reddaly): If the enum is defined at top-level, we need
36283628
// 'const <EnumName> = ' instead of '<EnumType> = '

0 commit comments

Comments
 (0)