Open FedorZaytsev opened 9 years ago
If you run tests.lua, this failure is reported in test 4. Also seems test 6 is failing:
2 tests aborted.. Test 4 : ./LCS.lua:132: attempt to index field '?' (a nil value) Test 6 : [string " local LCS = require 'LCS'..."]:3: attempt to call field 'static' (a nil value)
This code from your examples gives me an error after calling collectgarbage('collect')
LCS = require('LCS') Animal = LCS.class()
function Animal:yell() print('Yelling!') end
Dog = Animal:extends {name = nil} function Dog:init(name) self.name = name end
function Dog:yell() self:super('yell') end
puppet = Dog('waffles') print(puppet.name) --> waffles collectgarbage('collect') puppet:yell() --> Yelling!
Error: lua5.1: ./LCS.lua:156: attempt to index field '?' (a nil value) stack traceback: ./LCS.lua:156: in function 'super' test.lua:13: in function 'yell' test.lua:19: in main chunk