Stop type aliases from inheriting sfUsed (#19861)
Fixes #18201 Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
This commit is contained in:
parent
68aeb4c1a6
commit
f7a13f62d6
2 changed files with 41 additions and 14 deletions
|
|
@ -1506,7 +1506,7 @@ proc assignType*(dest, src: PType) =
|
|||
# this fixes 'type TLock = TSysLock':
|
||||
if src.sym != nil:
|
||||
if dest.sym != nil:
|
||||
dest.sym.flags.incl src.sym.flags-{sfExported}
|
||||
dest.sym.flags.incl src.sym.flags-{sfUsed, sfExported}
|
||||
if dest.sym.annex == nil: dest.sym.annex = src.sym.annex
|
||||
mergeLoc(dest.sym.loc, src.sym.loc)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue