mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-22 07:15:22 +00:00
make parseEnum skip type aliases for enum type sym (#22727)
fixes #22726
(cherry picked from commit 51cb493b22)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user