Associative arrays cannot be iterated over at compile time. This is because the implementation of the range interface for AAs is private.
enum range = ["a": "b"].byKey();
void main()
{
}
This code fails on DMD 2.108.0 with:
object.d(3130): Error: `_aaRange` cannot be interpreted at compile time, because it has no available source code
Comment #1 by robert.schadek — 2024-12-07T13:43:41Z