Skip to content

Poor error when iterator name missing in for loop #574

Closed
@jdm

Description

@jdm

Currently, if you write a loop like this:
for (type in named_list) {}

you get this message:

error: expecting in, found named_list

which is really obtuse. An easy heuristic to show a more informative message would be to check whether the iterator is named "in", possibly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions