parent
0a1e4cad7f
commit
c2434d939e
2 changed files with 8 additions and 1 deletions
|
|
@ -718,7 +718,7 @@ proc semForVars(c: PContext, n: PNode; flags: TExprFlags): PNode =
|
|||
result = n
|
||||
let iterBase = n[^2].typ
|
||||
var iter = skipTypes(iterBase, {tyGenericInst, tyAlias, tySink, tyOwned})
|
||||
var iterAfterVarLent = iter.skipTypes({tyLent, tyVar})
|
||||
var iterAfterVarLent = iter.skipTypes({tyGenericInst, tyAlias, tyLent, tyVar})
|
||||
# n.len == 3 means that there is one for loop variable
|
||||
# and thus no tuple unpacking:
|
||||
if iterAfterVarLent.kind != tyTuple or n.len == 3:
|
||||
|
|
|
|||
|
|
@ -55,3 +55,10 @@ const
|
|||
for i in 0..len(stringArray)-1:
|
||||
echo(stringArray[i])
|
||||
|
||||
# bug #15360
|
||||
|
||||
type Rule[T] = (int, T)
|
||||
|
||||
var t: seq[Rule[int]]
|
||||
for (c, t) in t:
|
||||
discard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue