From 0866dec8387a5ce6d5a547338147beda932114dc Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 26 Jul 2017 03:10:41 +0200 Subject: Usage of self.__super is discouraged --- test.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test.lua') diff --git a/test.lua b/test.lua index e66bd55..46a023e 100644 --- a/test.lua +++ b/test.lua @@ -21,7 +21,7 @@ function Child:new (a) self.a = a end function GrandChild:new (b, a) - self.__super.new(self, a) + GrandChild.__super.new(self, a) self.b = b end @@ -75,7 +75,7 @@ function Meta:new (x, y) self.y = y end function Meta.__add (self, op) - return self.__class(self.x + op.x, self.y + op.y) + return Meta(self.x + op.x, self.y + op.y) end local x = 5 -- cgit v1.1