summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorquantimnot <54247259+quantimnot@users.noreply.github.com>2022-06-04 00:25:21 -0400
committerGitHub <noreply@github.com>2022-06-04 06:25:21 +0200
commitf7a13f62d634300c3cf68e36dd7926a6a235d52f (patch)
tree6f48f2b40c702e91098266bed30289d3c6c1ffff /compiler
parent68aeb4c1a64ce73f38a471372277f5ec788f5a6e (diff)
downloadNim-f7a13f62d634300c3cf68e36dd7926a6a235d52f.tar.gz
Stop type aliases from inheriting sfUsed (#19861)
Fixes #18201

Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index f8343c1a3..6610a1333 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -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: