Skip to content

Error: fatal error: invalid kind for lastOrd(tyNone) with type M = set #25419

@tersec

Description

@tersec

Nim Version

Nim Compiler Version 2.2.6 [Linux: amd64]
Compiled at 2026-01-08
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: ab00c56904e3126ad826bb520d243513a139436a
active boot switches: -d:release
Nim Compiler Version 2.2.7 [Linux: amd64]
Compiled at 2026-01-08
Copyright (c) 2006-2025 by Andreas Rumpf

git hash: 919d0d5ea819ee9f258741247de41c93656bd129
active boot switches: -d:release
Nim Compiler Version 2.3.1 [Linux: amd64]
Compiled at 2026-01-08
Copyright (c) 2006-2026 by Andreas Rumpf

git hash: b3273e732dd628a0881448bc82ebedf103776ece
active boot switches: -d:release

Description

type M = set

It's not valid code, sure. But it's triggering an error in the compiler, not the compiler properly providing a diagnostic of which line of Nim code is incorrect.

Current Output

Error: fatal error: invalid kind for lastOrd(tyNone)

Expected Output

No fatal error within the Nim compiler

Known Workarounds

No response

Additional Information

No response

Metadata

Metadata

Assignees

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