mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-16 08:04:20 +00:00
fixes #22844; uses arrays to store holeyenums for iterations; much more efficient than sets and reasonable for holeyenums (#22845)
fixes #22844
This commit is contained in:
@@ -82,7 +82,7 @@ macro genEnumCaseStmt*(typ: typedesc, argSym: typed, default: typed,
|
||||
result.add nnkElse.newTree(default)
|
||||
|
||||
macro enumFullRange(a: typed): untyped =
|
||||
newNimNode(nnkCurly).add(a.getType[1][1..^1])
|
||||
newNimNode(nnkBracket).add(a.getType[1][1..^1])
|
||||
|
||||
macro enumNames(a: typed): untyped =
|
||||
# this could be exported too; in particular this could be useful for enum with holes.
|
||||
|
||||
Reference in New Issue
Block a user