#53 Crash when field has the same name as a system type
This commit is contained in:
parent
142e976c40
commit
4b7d5d3de4
@ -0,0 +1,16 @@
|
||||
{
|
||||
"int": "value-for-int",
|
||||
"float": "value-for-float",
|
||||
"complex": "value-for-complex",
|
||||
"list": "value-for-list",
|
||||
"tuple": "value-for-tuple",
|
||||
"range": "value-for-range",
|
||||
"str": "value-for-str",
|
||||
"bytearray": "value-for-bytearray",
|
||||
"bytes": "value-for-bytes",
|
||||
"memoryview": "value-for-memoryview",
|
||||
"set": "value-for-set",
|
||||
"frozenset": "value-for-frozenset",
|
||||
"map": "value-for-map",
|
||||
"bool": "value-for-bool"
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// Tests that messages may contain fields with names that are python types
|
||||
|
||||
message Test {
|
||||
// https://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex
|
||||
string int = 1;
|
||||
string float = 2;
|
||||
string complex = 3;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#generator-types
|
||||
string list = 10;
|
||||
string tuple = 11;
|
||||
string range = 12;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#str
|
||||
string str = 21;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#bytearray-objects
|
||||
string bytearray = 22;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#bytes-and-bytearray-operations
|
||||
string bytes = 23;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#memory-views
|
||||
string memoryview = 24;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#set-types-set-frozenset
|
||||
string set = 25;
|
||||
string frozenset = 26;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#dict
|
||||
string map = 27;
|
||||
|
||||
// https://docs.python.org/3/library/stdtypes.html#boolean-values
|
||||
string bool = 28;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user