Bug 6276 – [CTFE] Strange behavior of using ~= operator twice
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-07-09T01:17:00Z
Last change time
2011-08-04T05:26:53Z
Assigned to
nobody
Creator
youxkei
Comments
Comment #0 by youxkei — 2011-07-09T01:17:00Z
struct Foo{
int[] i;
}
bool func(){
Foo foo;
foo.i ~= 1;
foo.i ~= 2;//Compile fails on this line.
return true;
}
When I compiled this source code, compile of dmd v2.054 built from trunk failed.
Error: foo.i ~= 2 cannot be evaluated at compile time
This may shows that operator ~= or array in CTFE has wrong behavior.