Skip to content

Compiler assert whereas it should report an error #25214

@Pogzy

Description

@Pogzy

Nim Version

2.2.4

Description

For a given code if a a var like fields["xx"].getStr() is in a proc but not declared

Then the compiler stop with the following error:
assertions.nim(34) raiseAssert Error: unhandled exception: semcall.nim(366, 11) n[0].kind == nkBracketExpr and pos < n[0].len [AssertionDefect]

It should report a syntax error for unknown variable.

In that case--stackTrace:on --lineTrace:on did not change anything

Current Output

assertions.nim(34) raiseAssert Error: unhandled exception: semcall.nim(366, 11) n[0].kind == nkBracketExpr and pos < n[0].len [AssertionDefect]

Expected Output

an error of code with the line and name of the wrong var.

Known Workarounds

not known

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions