alternate fix + test for #12094, refs #13804 (#20686)

This commit is contained in:
metagn 2022-10-29 08:20:04 +03:00 • committed by GitHub
commit cb3af8ad39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View file

@ -370,8 +370,7 @@ proc addToVarSection(c: PContext; result: var PNode; orig, identDefs: PNode) =
result.add identDefs
proc isDiscardUnderscore(v: PSym): bool =
# template generated underscore symbol name starts with _`gensym
if v.name.s == "_" or v.name.s.startsWith("_`"):
if v.name.s == "_":
v.flags.incl(sfGenSym)
result = true