From cefa16ae7733df933f76a8599db6fed4f8fb1d4d Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 19 Aug 2013 01:29:58 +0300 Subject: [PATCH] Revert "Revert "fix threading tests"" This reverts commit 9c45e33d8c8b1a5f5fca69a467fda87b9b547057. --- compiler/semexprs.nim | 2 +- compiler/seminst.nim | 24 ++++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 3036a28e1a..d88cc28b68 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1827,7 +1827,7 @@ proc semExpr(c: PContext, n: PNode, flags: TExprFlags = {}): PNode = of nkBind: Message(n.info, warnDeprecated, "bind") result = semExpr(c, n.sons[0], flags) - of nkTypeOfExpr: + of nkTypeOfExpr, nkTupleTy, nkRefTy..nkEnumTy: var typ = semTypeNode(c, n, nil).skipTypes({tyTypeDesc}) result = symNodeFromType(c, typ, n.info) of nkCall, nkInfix, nkPrefix, nkPostfix, nkCommand, nkCallStrLit: diff --git a/compiler/seminst.nim b/compiler/seminst.nim index 431635b9c5..98f25efa7c 100644 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -165,28 +165,35 @@ proc fixupProcTypeR(c: PContext, genericType: PType, of tyOpenArray, tyArray, tySet, tySequence, tyTuple, tyProc, tyPtr, tyVar, tyRef, tyOrdinal, tyRange, tyVarargs: if genericType.sons == nil: return + var head = 0 for i in 0 ..