Skip to content

illformed AST for errorneous tuple syntax in for-loop variables #1534

Open
@alaviss

Description

@alaviss

Example

iterator iter(): (int, int) = yield (1, 0)

iterator other(): int =
  for (i,) in iter():
    yield i

Actual Output

test.nim(4, 7) Error: illformed AST: (i)

Expected Output

An error that the (i, _) form should be used or something similar. Accepting this is also an option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompiler/semRelated to semantic-analysis system of the compiler

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions