mirror of
https://github.com/kikito/middleclass.git
synced 2024-11-25 02:44:20 +00:00
Merge pull request #29 from kikito/static_index
Improve the static class lookup. Fixes #27
This commit is contained in:
commit
8043c7214d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user