From fe77227db0bd7c719763482152435ae91cebc682 Mon Sep 17 00:00:00 2001 From: kikito Date: Sun, 6 Dec 2009 16:08:58 +0000 Subject: [PATCH] Changed init to initialize Fixed bug on subclassOf --- MiddleClass.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MiddleClass.lua b/MiddleClass.lua index a0a50d6..9d652ba 100644 --- a/MiddleClass.lua +++ b/MiddleClass.lua @@ -85,7 +85,7 @@ setmetatable(Object, { __index = Object.__classDict, __newindex = Object.__class -- Returns true if class is a subclass of other, false otherwise function subclassOf(other, class) if class.superclass==nil then return false end --class is Object, or a non-class - return class.superclass == other or class.superclass:subclassOf(other) + return class.superclass == other or subclassOf(other, class.superclass) end -- Returns true if obj is an instance of class (or one of its subclasses) false otherwise