Skip to content

Doesn't understand empty class bodies with an ellipsis instead of "pass" #1069

@Newbytee

Description

@Newbytee

In my code, I had a custom exception declared like this:

class UnknownReleaseError(ValueError): ...

However, when trying to compile this with mypyc, it would yield the following error:

$ mypyc mrtest mrhlpr
mrhlpr/mr.py:177: error: Unsupported statement in class body

I had to change it to this to get it working, which should be functionally identical:

class UnknownReleaseError(ValueError):
    pass

I assume this is unintentional given that it works fine with regular CPython. mypyc version:

$ mypyc --version
mypy 1.11.2 (compiled: yes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions