Summary: [CTFE] Strange behavior of using ~= operator twice
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Hisayuki Mima <> 2011-07-09 01:17:00 PDT 
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

Error: foo.i ~= 2 cannot be evaluated at compile time

This may shows that operator ~= or array in CTFE has wrong behavior.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to