[
https://issues.apache.org/jira/browse/THRIFT-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer updated THRIFT-5439:
-------------------------------
Summary: Lua Generator does not support const i64 (was: Lua Generator: not
support const i64)
> Lua Generator does 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
> Priority: Major
> Labels: easyfix
> Original Estimate: 5m
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)