THRIFT-2100 typedefs are not correctly referenced when including from other thrift...
authorJens Geyer <jensg@apache.org>
Tue, 30 Jul 2013 01:08:17 +0000 (03:08 +0200)
committerJens Geyer <jensg@apache.org>
Tue, 30 Jul 2013 01:08:17 +0000 (03:08 +0200)
Patch: Remo Hertig

compiler/cpp/src/generate/t_go_generator.cc
lib/go/test/IncludesTest.thrift

index 4a38885..30be799 100644 (file)
@@ -3229,7 +3229,7 @@ string t_go_generator::type_to_go_type(t_type* type)
         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();
index 6b68806..6c7308b 100644 (file)
@@ -28,6 +28,7 @@ struct testStruct {
 
 struct TestStruct2 {
   1: testStruct blah,
+  2: ThriftTest.UserId id
 }
 
 service testService extends ThriftTest.SecondService {