[Issue 14324] New: Cannot cast AA to immutable at compile time
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 24 07:40:40 PDT 2015
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: nobody at puremagic.com
Reporter: dransic at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list