Skip to content

Error for map has a wonky span. #1095

Description

@otrho

For the following (taken from pintc/tests/loops/map_bad_type.pnt):

    let d = 22 + 33;
    let e = map x in d { x * 0 };

we get

Error: invalid map range type
   ╭─[map_bad_type.pnt:6:13]
   │
 6 │     let d = 22 + 33;
   │             ─┬
   │              ╰── expecting either array or range, found `int`
───╯

The span for the error should be on the d in map x in d { .. }.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions