diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 1fde91888b..a071d83648 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -780,6 +780,24 @@ proc makeVarTupleSection(c: PContext, n, a, def: PNode, typ: PType, symkind: TSy proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = var b: PNode result = copyNode(n) + + # transform var x, y = 12 into var x = 12; var y = 12 + # bug #18104; transformation should be finished before templates expansion + # TODO: move warnings for tuple here + var transformed = copyNode(n) + for i in 0.. 3 and a[^1].kind != nkEmpty: + for j in 0..