summaryrefslogtreecommitdiff
path: root/test/ThriftTest.thrift
diff options
context:
space:
mode:
authorYuxuan 'fishy' Wang <yuxuan.wang@reddit.com>2021-02-17 12:58:40 -0800
committerYuxuan 'fishy' Wang <fishywang@gmail.com>2021-02-17 18:50:47 -0800
commita2522c0c8329a76bab42af251f06bd348ad0ecbd (patch)
treee8d2f92beabf596f40fd0a053c3b3c22ecc91a6a /test/ThriftTest.thrift
parent36bd59ff8260b2d5bd5825d3361121423022948e (diff)
downloadthrift-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.thrift14
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,
+ )
+}