Bug 14324 – Cannot cast AA to immutable at compile time

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2015-03-24T14:40:40Z
Last change time
2024-12-13T18:41:24Z
Keywords
CTFE
Assigned to
No Owner
Creator
dransic
Moved to GitHub: dmd#18961 →

Comments

Comment #0 by dransic — 2015-03-24T14:40:40Z
immutable(int)[string] foo(int[string] aa) { return cast(immutable(int)[string]) aa; } void main() { auto x = foo(["a": 1]); enum y = foo(["a": 1]); // Error } bug.d(2): Error: cannot cast ["a":1] to immutable(int)[string] at compile time Maybe related to bug #11627.
Comment #1 by robert.schadek — 2024-12-13T18:41:24Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18961 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB