Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
IDL
struct Element { 1: string foobar } struct Test { 1: list<Element> elms }
produces this code:
Test.cs
public partial class Test : TBase { //... stuff ... public void Read (TProtocol iprot) { //... stuff ... case 1: if (field.Type == TType.List) { { Elms = new List<Element>(); TList _list0 = iprot.ReadListBegin(); for( int _i1 = 0; _i1 < _list0.Count; ++_i1) { Element _elem2 = new Element(); // <-- first instance _elem2 = new Element(); // <-- second instance _elem2.Read(iprot); Elms.Add(_elem2); } iprot.ReadListEnd(); } //... more stuff ... }