http://d.puremagic.com/issues/show_bug.cgi?id=3374
Summary: Associative array type not inferred
Product: D
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrei Alexandrescu <[email protected]> 2009-10-08
08:43:25 PDT ---
The error when trying to compile this snippet:
auto famousNamedConstants =
[ "pi" : 3.14, "e" : 2.71, "moving sofa" : 2.22 ];
is:
Error: cannot infer type from this array initializer
dmd: init.c:420: virtual Expression* ArrayInitializer::toExpression():
Assertion `0' failed.
Changing the sample to the following works:
double[string] famousNamedConstants =
[ "pi" : 3.14, "e" : 2.71, "moving sofa" : 2.22 ];
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------