Skip to content

Declaring a variable "error" and then throwing it causes a crash #536

@thatcosmonaut

Description

@thatcosmonaut
const error = new MyError()
throw error.toString()

transpiles to

        local error = MyError.new()
        error(tostring(error))

which throws the error
attempt to call local 'error' (a table value)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions