bugfix: type alias to generic; generic type not stripped away from for loop variable

This commit is contained in:
Araq 2012-01-07 20:03:41 +01:00
commit 7405278138
8 changed files with 118 additions and 69 deletions

View file

@ -116,9 +116,9 @@ proc explicitGenericInstantiation(c: PContext, n: PNode, s: PSym): PNode =
# type parameters:
if safeLen(candidate.ast.sons[genericParamsPos]) == n.len-1:
result.add(explicitGenericSym(c, n, candidate))
# get rid of nkSymChoice if not ambigious:
# get rid of nkSymChoice if not ambiguous:
if result.len == 1: result = result[0]
# candidateCount != 1: return explicitGenericInstError(n)
else:
assert false
result = explicitGenericInstError(n)