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 ..