Thrift 0.9.3 generates invalid Go code for the following Thrift file:
This is invalid because &Foo is not a Foo. However, if we flip the order in which Foo and Bar are defined, Thrift 0.9.3 gives us valid Go code:
The bug appears to manifest only with use-before-def of structs and a complex initializer containing a field that is a list of the used-before-def'd type. Other kinds of constants (eg list<Foo>) do not seem to expose the bug.