Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
0.9.2
-
None
Description
Suppose I have a union
union Select { 1: Aggregate selectAggregate, 2: SelectColumns selectColumns, }
the Go representation looks like
type Select struct { SelectAggregate *Aggregate `thrift:"selectAggregate,1" json:"selectAggregate"` SelectColumns *SelectColumns `thrift:"selectColumns,2" json:"selectColumns"` }
now when I create
Select = NewSelect() Select.SelectColumns = SelectColumns{ ... }
I get a nil dereference pointer when the code tries to invoke
select.SelectAggregate.writeField1()
however if I create a empty aggregate instantiation I get the error:
Cannot read a TUnion with more than one set value!