Merge pull request #29 from kikito/static_index

Improve the static class lookup. Fixes #27
This commit is contained in:
Enrique García 2015-10-12 12:51:07 +02:00
commit 8043c7214d

View File

@ -36,7 +36,7 @@ local function _setClassDictionariesMetatables(aClass)
if super then
local superStatic = super.static
setmetatable(dict, super.__instanceDict)
setmetatable(aClass.static, { __index = function(_,k) return dict[k] or superStatic[k] end })
setmetatable(aClass.static, { __index = function(_,k) return rawget(dict,k) or superStatic[k] end })
else
setmetatable(aClass.static, { __index = function(_,k) return dict[k] end })
end