Skip to content

Ellipsis in class declaration / definition #2029

Closed

Description

@rebcabin

Seems ellipsis is improperly treated as an expression in this circumstance.

@dataclass
class MultiplicityNode:
    """foo"""
    ...  # doesn't work in LPython ; does work in CPython --- LPython treats as expression?
    pass # works
semantic error: Only doc strings allowed as expressions inside class
  --> /Users/brian/CLionProjects/lpython/lasr/LP-pycharm/lasr_parser.py:91:5
   |
91 |     ...  # doesn't work --- treated as expression?
   |     ^^^ 

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions