6693 – [CTFE] Cannot set value to nested AA

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6693 - [CTFE] Cannot set value to nested AA
Summary: [CTFE] Cannot set value to nested AA
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2011年09月19日 06:54 UTC by Hisayuki Mima
Modified: 2011年09月26日 23:07 UTC (History)
2 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Hisayuki Mima 2011年09月19日 06:54:47 UTC
pragma(msg, {
 int[int][int] aaa;
 aaa[3][1] = 4;
 return 0;
}());
This code doesn't be compiled by dmd v2.055.
Comment 1 Don 2011年09月26日 08:20:44 UTC
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);


AltStyle によって変換されたページ (->オリジナル) /