Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.12.0
-
None
Description
function __TObject:new(init_obj) local obj = {} if ttype(obj) == 'table' then obj = init_obj end -- Use the __parent key and the __index function to achieve inheritance obj.__parent = self setmetatable(obj, __TObject.__mt) return obj end
In the above code in file Thrift.lua from lib lua in thrift project. I saw that it should check if init_obj is a table but this code is checking obj(a table as declare ?).
So i think the source must beĀ
function __TObject:new(init_obj) local obj = {} if ttype(init_obj) == 'table' then obj = init_obj end -- Use the __parent key and the __index function to achieve inheritance obj.__parent = self setmetatable(obj, __TObject.__mt) return obj end
Attachments
Attachments
Issue Links
- links to