Files
Nim/tests/iter/t25704.nim
Jake Leahy 484bb6c398 Fix generic tuple unpacking in iterators (#25705)
Fixes #25704

This makes sure that `iter` still has `tyGenericInst` skipped like
before, without skipping it for `iterType` which requires it

(cherry picked from commit f9524861f3)
2026-04-07 08:35:07 +02:00

14 lines
226 B
Nim

import std/[sugar, strutils]
type Res[T] = tuple[a: int, b: string]
iterator test(): Res[string] =
yield (1, "")
for (i, s) in test():
static:
echo typeof(i)
echo typeof(s)
let
a: int = i
b: string = s