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


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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to