THRIFT-2100 typedefs are not correctly referenced when including from other thrift files
Patch: Remo Hertig
diff --git a/compiler/cpp/src/generate/t_go_generator.cc b/compiler/cpp/src/generate/t_go_generator.cc
index 4a38885..30be799 100644
--- a/compiler/cpp/src/generate/t_go_generator.cc
+++ b/compiler/cpp/src/generate/t_go_generator.cc
@@ -3229,7 +3229,7 @@
string elemType = type_to_go_type(t->get_elem_type());
return string("[]") + elemType;
} else if (type->is_typedef()) {
- return publicize(((t_typedef*)type)->get_symbolic());
+ return publicize(type_name(type));
}
throw "INVALID TYPE IN type_to_go_type: " + type->get_name();
diff --git a/lib/go/test/IncludesTest.thrift b/lib/go/test/IncludesTest.thrift
index 6b68806..6c7308b 100644
--- a/lib/go/test/IncludesTest.thrift
+++ b/lib/go/test/IncludesTest.thrift
@@ -28,6 +28,7 @@
struct TestStruct2 {
1: testStruct blah,
+ 2: ThriftTest.UserId id
}
service testService extends ThriftTest.SecondService {