fixes #5529; don't merge type visibility flags
This commit is contained in:
parent
98c7bab8ea
commit
142b604c13
2 changed files with 4 additions and 4 deletions
|
|
@ -736,7 +736,7 @@ type
|
||||||
|
|
||||||
TLibKind* = enum
|
TLibKind* = enum
|
||||||
libHeader, libDynamic
|
libHeader, libDynamic
|
||||||
|
|
||||||
TLib* = object # also misused for headers!
|
TLib* = object # also misused for headers!
|
||||||
kind*: TLibKind
|
kind*: TLibKind
|
||||||
generated*: bool # needed for the backends:
|
generated*: bool # needed for the backends:
|
||||||
|
|
@ -744,7 +744,7 @@ type
|
||||||
name*: Rope
|
name*: Rope
|
||||||
path*: PNode # can be a string literal!
|
path*: PNode # can be a string literal!
|
||||||
|
|
||||||
|
|
||||||
CompilesId* = int ## id that is used for the caching logic within
|
CompilesId* = int ## id that is used for the caching logic within
|
||||||
## ``system.compiles``. See the seminst module.
|
## ``system.compiles``. See the seminst module.
|
||||||
TInstantiation* = object
|
TInstantiation* = object
|
||||||
|
|
@ -1259,7 +1259,7 @@ proc assignType*(dest, src: PType) =
|
||||||
# this fixes 'type TLock = TSysLock':
|
# this fixes 'type TLock = TSysLock':
|
||||||
if src.sym != nil:
|
if src.sym != nil:
|
||||||
if dest.sym != nil:
|
if dest.sym != nil:
|
||||||
dest.sym.flags = dest.sym.flags + src.sym.flags
|
dest.sym.flags = dest.sym.flags + (src.sym.flags-{sfExported})
|
||||||
if dest.sym.annex == nil: dest.sym.annex = src.sym.annex
|
if dest.sym.annex == nil: dest.sym.annex = src.sym.annex
|
||||||
mergeLoc(dest.sym.loc, src.sym.loc)
|
mergeLoc(dest.sym.loc, src.sym.loc)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -227,7 +227,7 @@ proc getLib(c: PContext, kind: TLibKind, path: PNode): PLib =
|
||||||
for it in c.libs:
|
for it in c.libs:
|
||||||
if it.kind == kind and trees.exprStructuralEquivalent(it.path, path):
|
if it.kind == kind and trees.exprStructuralEquivalent(it.path, path):
|
||||||
return it
|
return it
|
||||||
|
|
||||||
result = newLib(kind)
|
result = newLib(kind)
|
||||||
result.path = path
|
result.path = path
|
||||||
c.libs.add result
|
c.libs.add result
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue