Skip to content

Loosen restriction on requiring return expressions when a throw is used instead #1042

@danquirk

Description

@danquirk

Per #947, we currently require a return expression in a non-void returning function unless the first and only expression is a throw statement. This is basically an exemption to allow for throw new Exception('Not Yet Implemented'). It seems reasonable to allow throwing further along in a block if we're willing to try to track control flow, at which point we could likely also check for appropriate return expressions from all branches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions