summary refs log tree commit diff stats
path: root/lib/std
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-10-21 00:38:42 +0800
committerGitHub <noreply@github.com>2023-10-20 18:38:42 +0200
commite10878085eaf215a6782cde5c2ea79d4cdf0f40e (patch)
tree74d47dd7bbb24cb3e79e6c8e875731d1efdb3b2c /lib/std
parent27deacecaadd711cbb5a615abba3237925250616 (diff)
downloadNim-e10878085eaf215a6782cde5c2ea79d4cdf0f40e.tar.gz
fixes #22844; uses arrays to store holeyenums for iterations; much more efficient than sets and reasonable for holeyenums (#22845)
fixes #22844
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/enumutils.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/enumutils.nim b/lib/std/enumutils.nim
index 1ce82eccf..ca62a504c 100644
--- a/lib/std/enumutils.nim
+++ b/lib/std/enumutils.nim
@@ -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.