Bug 6693 – [CTFE] Cannot set value to nested AA

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-09-19T06:54:00Z
Last change time
2011-09-26T23:07:57Z
Assigned to
nobody
Creator
youxkei

Comments

Comment #0 by youxkei — 2011-09-19T06:54:47Z
pragma(msg, { int[int][int] aaa; aaa[3][1] = 4; return 0; }()); This code doesn't be compiled by dmd v2.055.
Comment #1 by clugdbug — 2011-09-26T08:20:44Z
The same thing can happen with dotvar or index expressions. ======================== struct S6693 { int[int] m; } static assert({ int[int][int] aaa; aaa[3][1] = 4; // AA int[int][3] aab; aab[2][1] = 4; // static array S6693 s; s.m[2] = 4; // dotvar expression return 6693; }() == 6693);
Comment #2 by bugzilla — 2011-09-26T23:07:57Z