Updated Branches: refs/heads/master 44b19df53 -> 7b07fbcba
THRIFT-2100 typedefs are not correctly referenced when including from other thrift files Patch: Remo Hertig Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/7b07fbcb Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/7b07fbcb Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/7b07fbcb Branch: refs/heads/master Commit: 7b07fbcba0a8df16ff890830f399d9c82152f04a Parents: 44b19df Author: Jens Geyer <[email protected]> Authored: Tue Jul 30 03:08:17 2013 +0200 Committer: Jens Geyer <[email protected]> Committed: Tue Jul 30 03:08:17 2013 +0200 ---------------------------------------------------------------------- compiler/cpp/src/generate/t_go_generator.cc | 2 +- lib/go/test/IncludesTest.thrift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/7b07fbcb/compiler/cpp/src/generate/t_go_generator.cc ---------------------------------------------------------------------- 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 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(); http://git-wip-us.apache.org/repos/asf/thrift/blob/7b07fbcb/lib/go/test/IncludesTest.thrift ---------------------------------------------------------------------- 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 testStruct { struct TestStruct2 { 1: testStruct blah, + 2: ThriftTest.UserId id } service testService extends ThriftTest.SecondService {
