greybel-vs
greybel-vs copied to clipboard
Self-referential __isa can blow up the call stack when passed through an extension function
This is a fun one:
Foo = {}
Foo.__isa = Foo
map.errCheck = function()
return self
end function
a = new Foo //-- or just Foo.
if a.errCheck isa Foo then print 1
Runtime error: Maximum call stack size exceeded