Skip to content

Commit b845cf0

Browse files
committed
Add changelog for #16334
1 parent 9d079ed commit b845cf0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

changelog/foreach-array-index-type.dd

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
`foreach` on a dynamic array can have an index type smaller than `size_t`
2+
3+
The array length is known at compile-time for the following cases:
4+
5+
* The array is a literal
6+
* The array is a slice expression whose upper bound is known at
7+
compile-time
8+
9+
For an array `a`, the index type can be any integer type `I` where
10+
`a.length <= I.max`.
11+
12+
Other cases [are not implemented](https://issues.dlang.org/show_bug.cgi?id=24542) yet.

0 commit comments

Comments
 (0)