Skip to content

Self-referential __isa can blow up the call stack when passed through an extension function #111

@Olipro

Description

@Olipro

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions