Bug 14070 – Letting compiler determine length for fixed-length arrays in foreach

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-28T14:45:27Z
Last change time
2024-12-13T18:39:38Z
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18939 →

Comments

Comment #0 by bearophile_hugs — 2015-01-28T14:45:27Z
Related to Issue 481 Given the recent improvements for type inference for arrays (https://github.com/D-Programming-Language/dmd/pull/3615 ), I think it can be handy to also support: void main() { int[2][] m = [[1, 2], [3, 4], [5, 6]]; foreach (auto[2] a; m) {} foreach (int[$] a; m) {} }
Comment #1 by robert.schadek — 2024-12-13T18:39:38Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18939 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB