Skip to content

Report unreachable statements because of return and throw statements #10

Description

@itssamuelrowe

The compiler should analyze the function body to detect statements that are completely unreachable because of return and throw statements that cause a function to exit.

Consider the following example:

function main(...arguments)
    return 0
    print('Hello, world!')

In the above example, the print statement is never executed because main() is terminated before it can reach the print statement.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions