You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Yi Zheng (JIRA)" <ji...@apache.org> on 2017/02/14 09:04:41 UTC
[jira] [Updated] (THRIFT-4090) compile error with array of alias in
golang
[ https://issues.apache.org/jira/browse/THRIFT-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yi Zheng updated THRIFT-4090:
-----------------------------
Issue Type: Bug (was: Question)
> compile error with array of alias in golang
> -------------------------------------------
>
> Key: THRIFT-4090
> URL: https://issues.apache.org/jira/browse/THRIFT-4090
> Project: Thrift
> Issue Type: Bug
> Components: Go - Compiler
> Affects Versions: 0.10.0
> Environment: mac sierra latest
> Reporter: Yi Zheng
> Fix For: 0.9.3
>
>
> This case works well under 0.9.3 but not in 0.10.0
> -aaa.thrift
> typedef i64 SomeStruct
> -bbb.thrift
> include "aaa.thrift"
> struct AnotherStruct {
> 1: required list<aaa.SomeStruct> another_struct;
> }
> ==========================================
> I read the compiled code, there will be code in "ReadFieldX" function like:
> for i := 0; i < size; i ++ {
> var _elem0 int64
> if v, err := iprot.ReadI64(); err != nil {
> return thrift.PrependError("error reading field 0: ", err)
> } else {
> _elem0 = v
> }
> p.EswLinkList = append(p.EswLinkList, _elem0) // <= compilation error here!
> }
> However, it is not allowed to append a int64 to an array of int64's alias.
> But this works in 0.9.3, I don't know whether this is an expected behavior?
> Thanks very much!
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)