Skip to content

Returning inside try block fails #252

Description

@tomblind
function foo() {
    try {
        return "foo";
    } finally {
        return "bar";
    }
}
print(foo());
function foo()
    xpcall(function()
        return "foo"
end,
function(e)
end)
    return "bar"
end
print(foo()); --Prints "bar"

The return statement only returns out of the function passed to xpcall. I'm not totally sure what a good way to deal with this would be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions