fixes a minor codegen issue where name mangling could produce an identifier used by the codegen; refs #5437

This commit is contained in:
Araq 2017-02-26 17:27:36 +01:00
commit 4c5ecb46b0
4 changed files with 10 additions and 10 deletions

View file

@ -181,7 +181,7 @@ proc mangle*(name: string): string =
of '_':
# we generate names like 'foo_9' for scope disambiguations and so
# disallow this here:
if i < name.len-1 and name[i] in Digits:
if i < name.len-1 and name[i+1] in Digits:
discard
else:
add(result, c)