fixes regression caused by code cleanups

This commit is contained in:
Araq 2015-04-29 22:24:50 +02:00
commit 6d05ae26e6
2 changed files with 767 additions and 1 deletions

View file

@ -1460,7 +1460,7 @@ proc takeType*(formal, arg: PType): PType =
let a = copyType(arg.skipTypes({tyGenericInst}), arg.owner, keepId=false)
a.sons[ord(arg.kind in {tyArray, tyArrayConstr})] = formal.sons[0]
result = a
elif formal.kind == tySet and arg.kind == tySet:
elif formal.kind in {tyTuple, tySet} and arg.kind == formal.kind:
result = formal
else:
result = arg