You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Matt Sanders (JIRA)" <ji...@apache.org> on 2016/01/14 18:12:39 UTC
[jira] [Updated] (THRIFT-3553) Go Map value type is dependent on
order of entity definitions
[ https://issues.apache.org/jira/browse/THRIFT-3553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Sanders updated THRIFT-3553:
---------------------------------
Labels: golang thrift (was: )
> 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
> Labels: golang, thrift
>
> 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)