Skip to content

Dead code triggers mypyc assertion #1028

@msullivan

Description

@msullivan
def foo() -> None:
    while True:
        raise AssertionError
        continue

or

def foo() -> None:
    raise AssertionError
    x = 1

triggers a

asdf.py:3: AssertionError: Can't add to finished block

We should either produce a nice error, or alternately just allow it.

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