summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/std/enumutils.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/std/enumutils.nim b/lib/std/enumutils.nim
index 0386c2589..1ce82eccf 100644
--- a/lib/std/enumutils.nim
+++ b/lib/std/enumutils.nim
@@ -22,7 +22,8 @@ macro genEnumCaseStmt*(typ: typedesc, argSym: typed, default: typed,
   # a normalized string comparison to the `argSym` input.
   # string normalization is done using passed normalizer.
   let typ = typ.getTypeInst[1]
-  let impl = typ.getImpl[2]
+  let typSym = typ.getTypeImpl.getTypeInst # skip aliases etc to get type sym
+  let impl = typSym.getImpl[2]
   expectKind impl, nnkEnumTy
   let normalizerNode = quote: `normalizer`
   expectKind normalizerNode, nnkSym