lfFullExternalName for 'nimrod pretty'

This commit is contained in:
Araq 2013-07-30 17:15:58 +02:00
commit d640121ce6
3 changed files with 14 additions and 7 deletions

View file

@ -119,7 +119,8 @@ proc processSym(c: PPassContext, n: PNode): PNode =
if {sfImportc, sfExportc} * s.flags != {}:
# careful, we must ensure the resulting name still matches the external
# name:
if newName != s.name.s and newName != s.loc.r.ropeToStr:
if newName != s.name.s and newName != s.loc.r.ropeToStr and
lfFullExternalName notin s.loc.flags:
Message(n.info, errGenerated,
"cannot rename $# to $# due to external name" % [s.name.s, newName])
cannotRename.incl(s.id)