Skip to content

Raise compile error when unreachable code is detected #20

@mattbasta

Description

@mattbasta

Unreachable code is any code inside a block that is preceded by a raise, return, continue, or break statement.

if foo {
    return;
    bar();  # unreachable
}
func foo() {
    raise 'err';
    bar();  # unreachable
}

This should apply to any block and the root.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions