mirror of
https://github.com/kikito/middleclass.git
synced 2024-11-25 02:44:20 +00:00
subclass's __instanceDict.__index should be a table if there is no custom __index
This commit is contained in:
parent
6102f676c2
commit
fd25b1a006
@ -147,7 +147,9 @@ local DefaultMixin = {
|
||||
local subclass = _createClass(name, self)
|
||||
|
||||
for methodName, f in pairs(self.__instanceDict) do
|
||||
_propagateInstanceMethod(subclass, methodName, f)
|
||||
if not (methodName == "__index" and type(f) == "table") then
|
||||
_propagateInstanceMethod(subclass, methodName, f)
|
||||
end
|
||||
end
|
||||
subclass.initialize = function(instance, ...) return self.initialize(instance, ...) end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user