KaibinHuang created THRIFT-5439:
-----------------------------------

             Summary: Lua Generator: not support const i64
                 Key: THRIFT-5439
                 URL: https://issues.apache.org/jira/browse/THRIFT-5439
             Project: Thrift
          Issue Type: Bug
          Components: Lua - Compiler
    Affects Versions: 0.14.2
            Reporter: KaibinHuang


 in thrift file:
 const i64 ALuaConst= 0x1

in generated lua file:
 ALuaConst = lualongnumber.new('')

bug is here:
 
[https://github.com/apache/thrift/blob/4434ee92d5141578cecac95ee53e3563101b9ecd/compiler/cpp/src/thrift/generate/t_lua_generator.cc#L262]
 should replace get_string() with get_integer()
 beacuse according to
 
[https://github.com/apache/thrift/blob/4434ee92d5141578cecac95ee53e3563101b9ecd/compiler/cpp/src/thrift/parse/t_scope.h#L153]
 when const type == i64, set_string() is unreachable, then get_string() will 
always return "".



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to