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,8 +147,10 @@ local DefaultMixin = {
|
|||||||
local subclass = _createClass(name, self)
|
local subclass = _createClass(name, self)
|
||||||
|
|
||||||
for methodName, f in pairs(self.__instanceDict) do
|
for methodName, f in pairs(self.__instanceDict) do
|
||||||
|
if not (methodName == "__index" and type(f) == "table") then
|
||||||
_propagateInstanceMethod(subclass, methodName, f)
|
_propagateInstanceMethod(subclass, methodName, f)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
subclass.initialize = function(instance, ...) return self.initialize(instance, ...) end
|
subclass.initialize = function(instance, ...) return self.initialize(instance, ...) end
|
||||||
|
|
||||||
self.subclasses[subclass] = true
|
self.subclasses[subclass] = true
|
||||||
|
Loading…
Reference in New Issue
Block a user