Bug 24658 – _aaRange cannot be interpreted at compile time, because it has no available source code

Status
NEW
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-07-12T04:54:14Z
Last change time
2024-12-07T13:43:41Z
Assigned to
No Owner
Creator
Jeremy Baxter
Moved to GitHub: dmd#17216 →

Comments

Comment #0 by jeremy — 2024-07-12T04:54:14Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17216 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB