diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index af4384b998..ce8b59f9cd 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1131,7 +1131,7 @@ proc semForVars(c: PContext, n: PNode; flags: TExprFlags): PNode = # BUGFIX: don't use `iter` here as that would strip away # the ``tyGenericInst``! See ``tests/compile/tgeneric.nim`` # for an example: - v.typ = makeIterTupleType(c, iterBase) + v.typ = iterBase n[0] = newSymNode(v) if sfGenSym notin v.flags and not isDiscardUnderscore(v): addDecl(c, v) elif v.owner == nil: setOwner(v, getCurrOwner(c)) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 77973521df..42efcd2399 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -1787,23 +1787,6 @@ proc maybeAliasType(c: PContext; typeExpr, prev: PType): PType = else: result = nil -proc makeIterTupleType(c: PContext; typ: PType): PType = - if typ.kind == tyTuple: - var hasView = false - result = newTypeS(tyTuple, c) - - for i in 0..