[Issue 2375] New: Error using invariant array initializers with indexed elements
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 26 03:27:35 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2375
Summary: Error using invariant array initializers with indexed
elements
Product: D
Version: 2.019
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: samukha at voliacable.com
May be duplicate of http://d.puremagic.com/issues/show_bug.cgi?id=1253
Marking it critical as the only workaround I've found is dupping the array,
which is not acceptable.
enum int[] a = [1 : 1];
void main()
{
auto e = a[0];
}
----
Error: array initializers as expressions are not allowed (x4)
--
More information about the Digitalmars-d-bugs
mailing list