diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-06-19 14:33:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 08:33:38 +0200 |
commit | 646bd99d461469f08e656f92ae278d6695b35778 (patch) | |
tree | 9929267c811c74c730eea09e30b32415037954de /compiler/semstmts.nim | |
parent | e64512036289434c6a7b377f52a50189beae75e8 (diff) | |
download | Nim-646bd99d461469f08e656f92ae278d6695b35778.tar.gz |
[backport] fixes #23711; C code contains backtick`gensym (#23716)
fixes #23711
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r-- | compiler/semstmts.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 8c7dda4e7..e4f22f435 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -480,7 +480,7 @@ proc identWithin(n: PNode, s: PIdent): bool = proc semIdentDef(c: PContext, n: PNode, kind: TSymKind, reportToNimsuggest = true): PSym = if isTopLevel(c): - result = semIdentWithPragma(c, kind, n, {sfExported}) + result = semIdentWithPragma(c, kind, n, {sfExported}, fromTopLevel = true) incl(result.flags, sfGlobal) #if kind in {skVar, skLet}: # echo "global variable here ", n.info, " ", result.name.s |