[ https://issues.apache.org/jira/browse/THRIFT-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King, III reassigned THRIFT-1346: ------------------------------------------ Assignee: James E. King, III > Incorrectly generates code for 'set' return type. > ------------------------------------------------- > > Key: THRIFT-1346 > URL: https://issues.apache.org/jira/browse/THRIFT-1346 > Project: Thrift > Issue Type: Bug > Components: Perl - Compiler > Affects Versions: 0.7 > Environment: Ubuntu/Centos, perl 5.10.1 > Reporter: Asyakin Andrey > Assignee: James E. King, III > > If return value is the 'set<type>', where type is sctruct, for example: > struct Result > { > 1: string response; > 2: i32 count; > } > service URLScheduler { set <Result> getResult(); } > produced the following deserialize code: > /^0$/ && do{ if ($ftype == TType::SET) { > { > $self->{success} = {}; > # ... > $elem5 = new XXX::Thrift::Result(); > $xfer += $elem5->read($input); > *$self->\{success\}->\{$elem5\} = 1;* > which gives { "XXX::Thrift::MyType=HASH(0x935b818)" => 1, ... } > Clearly, this is not true for the classes. It seems that this will not > prevent something like that: > $self->{success}->{$elem5} = ref $elem5 ? $elem5 : 1; -- This message was sent by Atlassian JIRA (v6.3.15#6346)