I see general perception that this code should compile of course if it depends only constant expressions. I will file yet another ticket at github issue tracker, using the following code as reproducible example: proc len(T: typedesc[tuple|object]): static[int] = var f: T for _ in fields(f): inc result proc fieldNames(T: typedesc[tuple|object]): array[len(T), string] = var i = 0 var f:T for name,_ in fieldPairs(f): result[i] = name inc i let tt = (a: 10, b: 20, c:30) echo fieldNames(type(t))
- Generic array size in proc return type cdome
- Re: Generic array size in proc return type coffeepot
- Re: Generic array size in proc return type mratsim
- Re: Generic array size in proc return type coffeepot
- Re: Generic array size in proc return type cdome