[
https://issues.apache.org/jira/browse/THRIFT-3553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098420#comment-15098420
]
Matt Sanders commented on THRIFT-3553:
--------------------------------------
Seems related to : https://issues.apache.org/jira/browse/THRIFT-3465
> Go Map value type is dependent on order of entity definitions
> -------------------------------------------------------------
>
> Key: THRIFT-3553
> URL: https://issues.apache.org/jira/browse/THRIFT-3553
> Project: Thrift
> Issue Type: Bug
> Components: Go - Compiler
> Reporter: Matt Sanders
> Priority: Minor
>
> Deserialization code of map type properties will generate a compilation error
> if the type definition of the value appears after the definition of the map
> where it is used.
> {code:title=Error Example}
> struct TestsResponse {
> 1: map<string, Test> tests
> }
> struct Test {
> 1: string id
> 2: string name
> }
> {code}
> Compilation Error
> {quote}
> ttypes.go:83: cannot use _val1 (type *Test) as type Test in assignment
> {quote}
> In the example moving the definition of 'Test' to appear before
> 'TestResponse' avoids the compilation error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)