CObjMethod refactor

This commit is contained in:
2020-11-17 15:07:56 -06:00
parent e6a377dfd0
commit aaed92424f
5 changed files with 40 additions and 36 deletions

18
examples/stress.cosmo Normal file
View File

@@ -0,0 +1,18 @@
class Test
function __init(self, x)
self.x = x
end
function print(self)
print(self.x)
end
end
-- stressing the GC
local i = 0
while true do
var x = Test("Hello world " .. i)
x.print()
i = i + 1
end