tester: threading tests added

This commit is contained in:
Araq 2011-11-19 02:05:16 +01:00
commit 62aa8bed3b
9 changed files with 96 additions and 29 deletions

View file

@ -92,7 +92,8 @@ proc symChoice(c: PContext, n: PNode, s: PSym): PNode =
# appropriately
result = newNodeIT(nkSymChoice, n.info, newTypeS(tyNone, c))
a = initOverloadIter(o, c, n)
while a != nil:
while a != nil:
incl(a.flags, sfUsed)
addSon(result, newSymNode(a))
a = nextOverloadIter(o, c, n)

View file

@ -857,11 +857,11 @@ proc typeAllowedAux(marker: var TIntSet, typ: PType, kind: TSymKind): bool =
of tyOpenArray, tyVarargs:
result = (kind == skParam) and typeAllowedAux(marker, t.sons[0], skVar)
of tySequence:
result = typeAllowedAux(marker, t.sons[0], skVar) or
t.sons[0].kind == tyEmpty
result = t.sons[0].kind == tyEmpty or
typeAllowedAux(marker, t.sons[0], skVar)
of tyArray:
result = typeAllowedAux(marker, t.sons[1], skVar) or
t.sons[1].kind == tyEmpty
result = t.sons[1].kind == tyEmpty or
typeAllowedAux(marker, t.sons[1], skVar)
of tyPtr, tyRef:
result = typeAllowedAux(marker, t.sons[0], skVar)
of tyArrayConstr, tyTuple, tySet, tyConst, tyMutable, tyIter, tyProxy: