diff options
author | Yuxuan 'fishy' Wang <yuxuan.wang@reddit.com> | 2021-02-17 12:58:40 -0800 |
---|---|---|
committer | Yuxuan 'fishy' Wang <fishywang@gmail.com> | 2021-02-17 18:50:47 -0800 |
commit | a2522c0c8329a76bab42af251f06bd348ad0ecbd (patch) | |
tree | e8d2f92beabf596f40fd0a053c3b3c22ecc91a6a /test/ThriftTest.thrift | |
parent | 36bd59ff8260b2d5bd5825d3361121423022948e (diff) | |
download | thrift-a2522c0c8329a76bab42af251f06bd348ad0ecbd.tar.gz |
THRIFT-4914: Fix name redeclaration bug in compiled go code
Client: go
This fixes the bug reported in
https://github.com/apache/thrift/pull/2315#discussion_r577919697.
Diffstat (limited to 'test/ThriftTest.thrift')
-rw-r--r-- | test/ThriftTest.thrift | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift index ac49aee01..c88187c54 100644 --- a/test/ThriftTest.thrift +++ b/test/ThriftTest.thrift @@ -411,3 +411,17 @@ struct StructB { struct OptionalSetDefaultTest { 1: optional set<string> with_default = [ "test" ] } + +service ConflictingNamesTest { + /** + * Use some names that could conflict with the compiler code as args + * to make sure that the compiler handled them correctly. + */ + void testNameConflicts( + // 1: string args, // args is already a reserved keyword in thrift compiler + // 2: string result, // result will cause problems in compiled netstd code + 3: string meta, + 4: string r, + 5: string err, + ) +} |