Merge branch 'devel' into faster-nimsuggest

This commit is contained in:
Andreas Rumpf 2017-03-03 13:00:09 +01:00
commit 5d125ca716
29 changed files with 240 additions and 66 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+1] in Digits:
if i > 0 and i < name.len-1 and name[i+1] in Digits:
discard
else:
add(result, c)

View file

@ -218,8 +218,13 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
of tyTuple:
if inst:
result = newNodeX(nkTupleTy)
for s in t.n.sons:
result.add newIdentDefs(s)
# only named tuples have a node, unnamed tuples don't
if t.n.isNil:
for subType in t.sons:
result.add mapTypeToAst(subType, info)
else:
for s in t.n.sons:
result.add newIdentDefs(s)
else:
result = mapTypeToBracket("tuple", mTuple, t, info)
of tySet: result = mapTypeToBracket("set", mSet, t, info)