-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Figuring out nested enum collissions - #212
- Loading branch information
Showing
4 changed files
with
129 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
syntax = "proto3"; | ||
|
||
package nested_enum; | ||
|
||
message Test { | ||
enum Inner { | ||
NONE = 0; | ||
THIS = 1; | ||
} | ||
Inner status = 1; | ||
|
||
message Doubly { | ||
enum Inner { | ||
NONE = 0; | ||
THIS = 1; | ||
} | ||
Inner status = 1; | ||
} | ||
} | ||
|
||
|
||
message TestInner { | ||
int32 foo = 1; | ||
} | ||
|
||
message TestDoublyInner { | ||
int32 foo = 1; | ||
string bar = 2; | ||
} | ||
|
||
enum Outer { | ||
foo = 0; | ||
bar = 1; | ||
} | ||
|
||
message Content { | ||
message Status { | ||
string code = 1; | ||
} | ||
Status status = 1; | ||
} | ||
|
||
message ContentStatus { | ||
int32 id = 1; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import betterproto | ||
from dataclasses import dataclass | ||
|