Add changelog for #16334 (#16470)

This commit is contained in:
Nick Treleaven 2024-05-10 16:03:18 +01:00 committed by GitHub
parent 109dddb649
commit 23f6757be9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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