https://issues.dlang.org/show_bug.cgi?id=14324
Issue ID: 14324
Summary: Cannot cast AA to immutable at compile time
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
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.
--