Fix compilation of fields with name identical to their type (#294)
* Revert "Fix compilation of fields named 'bytes' or 'str' (#226)"
This reverts commit deb623ed14.
* Fix compilation of fileds with name identical to their type
* Added test for field-name identical to python type
Co-authored-by: Guy Szweigman <guysz@nvidia.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"int": 26,
|
||||
"float": 26.0,
|
||||
"str": "value-for-str",
|
||||
"bytes": "001a",
|
||||
"bool": true
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// Tests that messages may contain fields with names that are identical to their python types (PR #294)
|
||||
|
||||
message Test {
|
||||
int32 int = 1;
|
||||
float float = 2;
|
||||
string str = 3;
|
||||
bytes bytes = 4;
|
||||
bool bool = 5;
|
||||
}
|
||||
Reference in New Issue
Block a user